From 0499600d37c60a1f02aff5d0a6752637c29d7969 Mon Sep 17 00:00:00 2001 From: volar Date: Tue, 5 Dec 2023 17:42:50 +0100 Subject: [PATCH] wip --- .../components/UploadQueueItemEditable.vue | 40 +++++++++++-------- src/locales/sk/common/damImage.json | 2 +- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/src/components/damImage/uploadQueue/components/UploadQueueItemEditable.vue b/src/components/damImage/uploadQueue/components/UploadQueueItemEditable.vue index 64a56002..8ba387ba 100644 --- a/src/components/damImage/uploadQueue/components/UploadQueueItemEditable.vue +++ b/src/components/damImage/uploadQueue/components/UploadQueueItemEditable.vue @@ -17,6 +17,7 @@ import AssetFileFailReasonChip from '@/components/damImage/uploadQueue/component import AuthorRemoteAutocompleteWithCached from '@/components/damImage/uploadQueue/author/AuthorRemoteAutocompleteWithCached.vue' import { ADamAssetMetadataValidationScopeSymbol } from '@/components/damImage/uploadQueue/composables/uploadValidations' import KeywordRemoteAutocompleteWithCached from '@/components/damImage/uploadQueue/keyword/KeywordRemoteAutocompleteWithCached.vue' +import { isNull } from '@/utils/common' const props = withDefaults( defineProps<{ @@ -39,6 +40,7 @@ const emit = defineEmits<{ (e: 'update:authors', data: DocId[]): void (e: 'cancelItem', data: { index: number; item: UploadQueueItem; queueKey: string }): void (e: 'removeItem', index: number): void + (e: 'showDetail', data: DocId): void }>() const IMAGE_ASPECT_RATIO = 16 / 9 @@ -93,16 +95,16 @@ const uploadProgress = computed(() => { return props.item.progress.progressPercent }) -const remove = async () => { - if (!props.item.assetId) return - try { - // await deleteAsset(props.item.assetId) - emit('removeItem', props.index) - showRecordWas('deleted') - } catch (error) { - showErrorsDefault(error) - } -} +// const remove = async () => { +// if (!props.item.assetId) return +// try { +// // await deleteAsset(props.item.assetId) +// emit('removeItem', props.index) +// showRecordWas('deleted') +// } catch (error) { +// showErrorsDefault(error) +// } +// } const imageSrc = computed(() => { return props.item.imagePreview ? props.item.imagePreview.url : undefined }) @@ -125,6 +127,11 @@ const showCancel = computed(() => { props.item.status ) }) + +const showDetail = async () => { + if (isNull(props.item.assetId)) return + emit('showDetail', props.item.assetId) +}