feat(integrity): ImageViewer badge for corrupt/unverified status
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,13 @@
|
|||||||
<v-icon>mdi-close</v-icon>
|
<v-icon>mdi-close</v-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<v-chip
|
||||||
|
v-if="integrityBadge"
|
||||||
|
:color="integrityBadge.color"
|
||||||
|
class="fc-viewer__integrity"
|
||||||
|
size="x-small" variant="flat"
|
||||||
|
>{{ integrityBadge.label }}</v-chip>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
class="fc-viewer__nav fc-viewer__nav--prev"
|
class="fc-viewer__nav fc-viewer__nav--prev"
|
||||||
:disabled="!modal.canPrev" @click="modal.goPrev()" aria-label="Previous"
|
:disabled="!modal.canPrev" @click="modal.goPrev()" aria-label="Previous"
|
||||||
@@ -68,6 +75,14 @@ const isVideo = computed(() =>
|
|||||||
modal.current?.mime && modal.current.mime.startsWith('video/')
|
modal.current?.mime && modal.current.mime.startsWith('video/')
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const integrityBadge = computed(() => {
|
||||||
|
const s = modal.current?.integrity_status
|
||||||
|
if (s === 'corrupt') return { color: 'error', label: 'Corrupt' }
|
||||||
|
if (s === 'failed_verification')
|
||||||
|
return { color: 'warning', label: 'Unverified' }
|
||||||
|
return null
|
||||||
|
})
|
||||||
|
|
||||||
let prevBodyOverflow = null
|
let prevBodyOverflow = null
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
prevBodyOverflow = document.body.style.overflow
|
prevBodyOverflow = document.body.style.overflow
|
||||||
@@ -128,6 +143,9 @@ function isTextEntry(el) {
|
|||||||
}
|
}
|
||||||
.fc-viewer__nav:disabled { opacity: 0.3; cursor: not-allowed; }
|
.fc-viewer__nav:disabled { opacity: 0.3; cursor: not-allowed; }
|
||||||
.fc-viewer__close { top: 16px; right: 16px; transform: none; }
|
.fc-viewer__close { top: 16px; right: 16px; transform: none; }
|
||||||
|
.fc-viewer__integrity {
|
||||||
|
position: absolute; top: 72px; right: 16px; z-index: 3;
|
||||||
|
}
|
||||||
.fc-viewer__nav--prev { left: 16px; transform: translateY(-50%); }
|
.fc-viewer__nav--prev { left: 16px; transform: translateY(-50%); }
|
||||||
.fc-viewer__nav--next { right: 16px; transform: translateY(-50%); }
|
.fc-viewer__nav--next { right: 16px; transform: translateY(-50%); }
|
||||||
.fc-viewer__body {
|
.fc-viewer__body {
|
||||||
|
|||||||
Reference in New Issue
Block a user