Slave/ui polishing #13
Vendored
+1
@@ -24,6 +24,7 @@ declare module 'vue' {
|
||||
ShareLinkField: typeof import('./components/upload/ShareLinkField.vue')['default']
|
||||
UploadConfigureModal: typeof import('./components/upload/UploadConfigureModal.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']
|
||||
UploadSettingsPanel: typeof import('./components/upload/UploadSettingsPanel.vue')['default']
|
||||
UploadShareResults: typeof import('./components/upload/UploadShareResults.vue')['default']
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<template>
|
||||
<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">
|
||||
<h2 class="text-sm font-medium text-card-foreground">Metadata Inspector</h2>
|
||||
<p v-if="fileName" class="mt-0.5 truncate text-xs text-muted-foreground">{{ fileName }}</p>
|
||||
</header>
|
||||
<UploadPanelHeader
|
||||
title="Metadata Inspector"
|
||||
:file-name="fileName"
|
||||
:thumbnail-url="thumbnailUrl"
|
||||
/>
|
||||
|
||||
<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>
|
||||
@@ -45,6 +46,10 @@ const props = defineProps({
|
||||
entry: {
|
||||
type: Object as PropType<MetadataPreviewEntry>,
|
||||
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>
|
||||
<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">
|
||||
<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>
|
||||
<UploadPanelHeader title="Share links" :file-name="fileName" :thumbnail-url="thumbnailUrl" />
|
||||
|
||||
<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>
|
||||
@@ -60,6 +57,10 @@ const props = defineProps({
|
||||
upload: {
|
||||
type: Object as PropType<UploadQueueEntry>,
|
||||
required: true
|
||||
},
|
||||
thumbnailUrl: {
|
||||
type: String as PropType<string | null>,
|
||||
default: null
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -21,9 +21,18 @@
|
||||
|
||||
<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>
|
||||
</template>
|
||||
|
||||
@@ -101,6 +110,16 @@ const queueRows = computed(() =>
|
||||
|
||||
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 metadataErrorCount = computed(
|
||||
|
||||
Reference in New Issue
Block a user