Place CR icon correctly on (scaled) image
Also, show "red dot" only if details not viewed already.
This commit is contained in:
parent
28865658d2
commit
c66602deb7
7 changed files with 74 additions and 37 deletions
|
|
@ -24,16 +24,16 @@
|
|||
<div :class="{ 'send-attachments__selecting__current-item': true, 'drop-target': dropTarget }"
|
||||
@drop.prevent="filesDropped" @dragover.prevent="dropTarget = true" @dragleave.prevent="dropTarget = false"
|
||||
@dragenter.prevent="dropTarget = true">
|
||||
<ThumbnailView :item="currentAttachment" />
|
||||
<div v-if="currentAttachment && currentAttachment.status === 'loading'"
|
||||
class="send-attachments__selecting__current-item__preparing">
|
||||
<div style="font-size: 0.7em; opacity: 0.7">
|
||||
<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>
|
||||
<ThumbnailView :item="currentAttachment">
|
||||
<template v-slot:decorator v-if="currentAttachment && currentAttachment.status === 'loading'">
|
||||
<div style="font-size: 0.7em; opacity: 0.7">
|
||||
<v-progress-circular indeterminate class="mb-0"></v-progress-circular>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:decorator v-else-if="showCCIcon">
|
||||
<v-icon style="width:24px;height:24px">$vuetify.icons.ic_cr</v-icon>
|
||||
</template>
|
||||
</ThumbnailView>
|
||||
|
||||
</div>
|
||||
<div class="file-drop-thumbnail-container">
|
||||
|
|
@ -68,7 +68,7 @@
|
|||
<v-btn class="send-button clickable" icon="arrow_upward" size="default" elevation="0" color="black"
|
||||
@click.stop="sendAll" :disabled="sendButtonDisabled"></v-btn>
|
||||
</div>
|
||||
<v-badge location="top right" color="#ff3300" dot class="cc-badge" :model-value="anyContainsCC">
|
||||
<v-badge location="top right" color="#ff3300" dot class="cc-badge" :model-value="showRedDotBadge">
|
||||
<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>
|
||||
|
|
@ -228,11 +228,17 @@ export default defineComponent({
|
|||
}
|
||||
return undefined;
|
||||
},
|
||||
anyContainsCC(): boolean {
|
||||
return this.batch.attachments.some((a: Attachment) => a.proof?.integrity?.c2pa !== undefined);
|
||||
showRedDotBadge(): boolean {
|
||||
return this.currentAttachment && this.currentAttachment.proof?.integrity?.c2pa !== undefined && !this.currentAttachment.detailsViewed;
|
||||
},
|
||||
showCCIcon(): boolean {
|
||||
return this.currentAttachment && this.currentAttachment.proof?.integrity?.c2pa !== undefined && !this.currentAttachment.useScaled;
|
||||
},
|
||||
currentlyViewedItem(): Attachment | undefined {
|
||||
if (this.showAttachmentInformation) {
|
||||
return this.currentAttachment;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
@ -247,6 +253,11 @@ export default defineComponent({
|
|||
},
|
||||
deep: 1,
|
||||
},
|
||||
currentlyViewedItem(newVal) {
|
||||
if (newVal) {
|
||||
newVal.detailsViewed = true; // We have seen this now
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showInformation() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue