Make sure CC icon/badge is shown
Also, always compress images, even if smaller than 640 pixels. For issue #680.
This commit is contained in:
parent
6fd59aa4c9
commit
a318934376
3 changed files with 59 additions and 29 deletions
|
|
@ -28,6 +28,10 @@
|
|||
<v-progress-circular indeterminate class="mb-0"></v-progress-circular>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="showCCIcon" class="send-attachments__selecting__current-item__cc">
|
||||
<v-icon style="width:24px;height:24px">$vuetify.icons.ic_cr</v-icon>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="file-drop-thumbnail-container">
|
||||
<v-tooltip location="top" v-for="(attachment, index) in batch.attachments" :key="index">
|
||||
|
|
@ -85,15 +89,17 @@
|
|||
:disabled="sendButtonDisabled"
|
||||
></v-btn>
|
||||
</div>
|
||||
<v-btn
|
||||
class="info-button clickable"
|
||||
icon="$vuetify.icons.ic_share_settings"
|
||||
size="44"
|
||||
elevation="0"
|
||||
color="black"
|
||||
@click.stop="showInformation"
|
||||
:disabled="currentAttachment?.status !== 'loaded'"
|
||||
></v-btn>
|
||||
<v-badge location="top right" color="#ff3300" dot class="cc-badge" :model-value="anyContainsCC">
|
||||
<v-btn
|
||||
class="info-button clickable"
|
||||
icon="$vuetify.icons.ic_share_settings"
|
||||
size="44"
|
||||
elevation="0"
|
||||
color="black"
|
||||
@click.stop="showInformation"
|
||||
:disabled="currentAttachment?.status !== 'loaded'"
|
||||
></v-btn>
|
||||
</v-badge>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -283,6 +289,12 @@ export default defineComponent({
|
|||
}
|
||||
return undefined;
|
||||
},
|
||||
anyContainsCC(): boolean {
|
||||
return this.batch.attachments.some((a: Attachment) => a.proof?.integrity?.c2pa !== undefined);
|
||||
},
|
||||
showCCIcon(): boolean {
|
||||
return this.currentAttachment && this.currentAttachment.proof?.integrity?.c2pa !== undefined && !this.currentAttachment.useScaled;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
"batch.attachments": {
|
||||
|
|
@ -360,4 +372,10 @@ export default defineComponent({
|
|||
<style lang="scss">
|
||||
@use "@/assets/css/chat.scss" as *;
|
||||
@use "@/assets/css/sendattachments.scss" as *;
|
||||
|
||||
.cc-badge.v-badge--dot .v-badge__badge {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue