Show copyable share links after batch upload completes.

Add share results panel gated by showShareLinks, build URLs from queue entry secrets, and align file name handling with the metadata inspector.
This commit is contained in:
2026-10-25 22:00:16 +01:00
parent f305ce7a39
commit f5be0a0de3
4 changed files with 173 additions and 3 deletions
+14 -3
View File
@@ -31,12 +31,18 @@
<p v-if="selectionError" class="text-sm text-destructive">{{ selectionError }}</p>
</div>
<p v-if="confirmedBatchSummary" class="text-center text-xs text-muted-foreground" aria-live="polite">
<p v-if="confirmedBatchSummary" class="text-center text-xs text-muted-foreground">
{{ confirmedBatchSummary }}
</p>
<UploadQueueList :rows="queueRows" :selected-file="selectedFile" @select="selectedFile = $event" />
<UploadShareResults
v-if="showShareLinks"
:file-name="selectedFile?.name ?? null"
:upload="selectedUpload"
/>
<MetadataInspector :file-name="selectedFile?.name ?? null" :entry="selectedPreview" />
<UploadConfigureModal
@@ -87,6 +93,7 @@ const batchSettings = ref<UploadBatchSettingsForm>({
});
const configureModalOpen = ref(false);
const uploadConfirmed = ref(false);
const showShareLinks = ref(false);
const confirmedBatchSummary = ref<string | null>(null);
onBeforeMount(async () => {
@@ -114,6 +121,8 @@ const queueRows = computed(() =>
const selectedPreview = computed(() => metadataStore.getPreview(selectedFile.value));
const selectedUpload = computed(() => uploadStore.getUpload(selectedFile.value));
const metadataErrorCount = computed(
() => queuedFiles.value.filter(file => metadataStore.getPreview(file).status === 'error').length
);
@@ -125,7 +134,7 @@ const onFilesPicked = async (picked: File[]): Promise<void> => {
return;
}
resetUploadSelection();
resetUploadSession();
if (picked.length === 0) {
return;
@@ -168,7 +177,7 @@ const onFilesPicked = async (picked: File[]): Promise<void> => {
}
};
const resetUploadSelection = (): void => {
const resetUploadSession = (): void => {
selectionError.value = null;
clearAllPreviews();
queuedFiles.value = [];
@@ -177,6 +186,7 @@ const resetUploadSelection = (): void => {
dropzoneRef.value?.clearInput();
configureModalOpen.value = false;
uploadConfirmed.value = false;
showShareLinks.value = false;
confirmedBatchSummary.value = null;
};
@@ -195,6 +205,7 @@ const onBatchUpload = async (uploadDespiteMetadataFailure?: boolean): Promise<vo
console.error(error);
} finally {
batchUploading.value = false;
showShareLinks.value = true;
}
};
</script>