add preview thumbnail to metadata inspector and share links.
Reuse queue object URLs in UploadPanelHeader for the selected row.
This commit is contained in:
Vendored
+1
@@ -24,6 +24,7 @@ declare module 'vue' {
|
|||||||
ShareLinkField: typeof import('./components/upload/ShareLinkField.vue')['default']
|
ShareLinkField: typeof import('./components/upload/ShareLinkField.vue')['default']
|
||||||
UploadConfigureModal: typeof import('./components/upload/UploadConfigureModal.vue')['default']
|
UploadConfigureModal: typeof import('./components/upload/UploadConfigureModal.vue')['default']
|
||||||
UploadIntakeControls: typeof import('./components/upload/UploadIntakeControls.vue')['default']
|
UploadIntakeControls: typeof import('./components/upload/UploadIntakeControls.vue')['default']
|
||||||
|
UploadPanelHeader: typeof import('./components/upload/UploadPanelHeader.vue')['default']
|
||||||
UploadQueueList: typeof import('./components/upload/UploadQueueList.vue')['default']
|
UploadQueueList: typeof import('./components/upload/UploadQueueList.vue')['default']
|
||||||
UploadSettingsPanel: typeof import('./components/upload/UploadSettingsPanel.vue')['default']
|
UploadSettingsPanel: typeof import('./components/upload/UploadSettingsPanel.vue')['default']
|
||||||
UploadShareResults: typeof import('./components/upload/UploadShareResults.vue')['default']
|
UploadShareResults: typeof import('./components/upload/UploadShareResults.vue')['default']
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="flex min-h-48 flex-col rounded-lg border border-border bg-card">
|
<section class="flex min-h-48 flex-col rounded-lg border border-border bg-card">
|
||||||
<header class="border-b border-border px-3 py-2.5 sm:px-4 sm:py-3">
|
<UploadPanelHeader
|
||||||
<h2 class="text-sm font-medium text-card-foreground">Metadata Inspector</h2>
|
title="Metadata Inspector"
|
||||||
<p v-if="fileName" class="mt-0.5 truncate text-xs text-muted-foreground">{{ fileName }}</p>
|
:file-name="fileName"
|
||||||
</header>
|
:thumbnail-url="thumbnailUrl"
|
||||||
|
/>
|
||||||
|
|
||||||
<div class="flex flex-1 flex-col gap-3 p-4">
|
<div class="flex flex-1 flex-col gap-3 p-4">
|
||||||
<p v-if="!fileName" class="text-sm text-muted-foreground">Select an image to view its metadata.</p>
|
<p v-if="!fileName" class="text-sm text-muted-foreground">Select an image to view its metadata.</p>
|
||||||
@@ -45,6 +46,10 @@ const props = defineProps({
|
|||||||
entry: {
|
entry: {
|
||||||
type: Object as PropType<MetadataPreviewEntry>,
|
type: Object as PropType<MetadataPreviewEntry>,
|
||||||
required: true
|
required: true
|
||||||
|
},
|
||||||
|
thumbnailUrl: {
|
||||||
|
type: String as PropType<string | null>,
|
||||||
|
default: null
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
<template>
|
||||||
|
<header class="border-b border-border px-3 py-2.5 sm:px-4 sm:py-3">
|
||||||
|
<div class="flex items-start gap-3 sm:items-center">
|
||||||
|
<img
|
||||||
|
v-if="thumbnailUrl"
|
||||||
|
:src="thumbnailUrl"
|
||||||
|
class="h-10 w-10 shrink-0 rounded border border-border object-cover"
|
||||||
|
loading="lazy"
|
||||||
|
decoding="async"
|
||||||
|
/>
|
||||||
|
<span
|
||||||
|
v-else-if="fileName"
|
||||||
|
class="h-10 w-10 shrink-0 rounded border border-border bg-muted/60"
|
||||||
|
aria-hidden="true"
|
||||||
|
/>
|
||||||
|
<div class="min-w-0 flex-1">
|
||||||
|
<h2 class="text-sm font-medium text-card-foreground">{{ title }}</h2>
|
||||||
|
<p v-if="fileName" class="mt-0.5 truncate text-xs text-muted-foreground">{{ fileName }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { type PropType } from 'vue';
|
||||||
|
|
||||||
|
defineProps({
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
fileName: {
|
||||||
|
type: String as PropType<string | null>,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
thumbnailUrl: {
|
||||||
|
type: String as PropType<string | null>,
|
||||||
|
default: null
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -1,9 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="flex min-h-48 flex-col rounded-lg border border-border bg-card">
|
<section class="flex min-h-48 flex-col rounded-lg border border-border bg-card">
|
||||||
<header class="border-b border-border px-3 py-2.5 sm:px-4 sm:py-3">
|
<UploadPanelHeader title="Share links" :file-name="fileName" :thumbnail-url="thumbnailUrl" />
|
||||||
<h2 class="text-sm font-medium text-card-foreground">Share links</h2>
|
|
||||||
<p v-if="fileName" class="mt-0.5 truncate text-xs text-muted-foreground">{{ fileName }}</p>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<div class="flex flex-1 flex-col gap-3 p-4">
|
<div class="flex flex-1 flex-col gap-3 p-4">
|
||||||
<p v-if="!fileName" class="text-sm text-muted-foreground">Select an image to view share links.</p>
|
<p v-if="!fileName" class="text-sm text-muted-foreground">Select an image to view share links.</p>
|
||||||
@@ -60,6 +57,10 @@ const props = defineProps({
|
|||||||
upload: {
|
upload: {
|
||||||
type: Object as PropType<UploadQueueEntry>,
|
type: Object as PropType<UploadQueueEntry>,
|
||||||
required: true
|
required: true
|
||||||
|
},
|
||||||
|
thumbnailUrl: {
|
||||||
|
type: String as PropType<string | null>,
|
||||||
|
default: null
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -21,9 +21,18 @@
|
|||||||
|
|
||||||
<UploadQueueList :rows="queueRows" :selected-file="selectedFile" @select="selectedFile = $event" />
|
<UploadQueueList :rows="queueRows" :selected-file="selectedFile" @select="selectedFile = $event" />
|
||||||
|
|
||||||
<UploadShareResults v-if="showShareLinks" :file-name="selectedFile?.name ?? null" :upload="selectedUpload" />
|
<UploadShareResults
|
||||||
|
v-if="showShareLinks"
|
||||||
|
:file-name="selectedFile?.name ?? null"
|
||||||
|
:upload="selectedUpload"
|
||||||
|
:thumbnail-url="selectedThumbnailUrl"
|
||||||
|
/>
|
||||||
|
|
||||||
<MetadataInspector :file-name="selectedFile?.name ?? null" :entry="selectedPreview" />
|
<MetadataInspector
|
||||||
|
:file-name="selectedFile?.name ?? null"
|
||||||
|
:entry="selectedPreview"
|
||||||
|
:thumbnail-url="selectedThumbnailUrl"
|
||||||
|
/>
|
||||||
</main>
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -101,6 +110,16 @@ const queueRows = computed(() =>
|
|||||||
|
|
||||||
const selectedPreview = computed(() => metadataStore.getPreview(selectedFile.value));
|
const selectedPreview = computed(() => metadataStore.getPreview(selectedFile.value));
|
||||||
|
|
||||||
|
const selectedThumbnailUrl = computed((): string | null => {
|
||||||
|
if (!selectedFile.value) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const key = makeKeyFromFile(selectedFile.value);
|
||||||
|
|
||||||
|
return thumbnailUrlsByKey.value[key] ?? null;
|
||||||
|
});
|
||||||
|
|
||||||
const selectedUpload = computed(() => uploadStore.getUpload(selectedFile.value));
|
const selectedUpload = computed(() => uploadStore.getUpload(selectedFile.value));
|
||||||
|
|
||||||
const metadataErrorCount = computed(
|
const metadataErrorCount = computed(
|
||||||
|
|||||||
Reference in New Issue
Block a user