From cfbff75f78963e3d24326f731590e78a4d719e9e Mon Sep 17 00:00:00 2001 From: Zéro~Informatique Date: Sun, 6 Nov 2022 19:34:26 +0100 Subject: viewer/command: add item download button Fixed a reactivity issue with props used in a composition function (useItemResource) Fixed crash with null items in LayoutTop Changed how downloadable items are identified: We use the fact they are materialized in the gallery instead of a hardly defined "listing condition". This also simplifies the code. --- viewer/src/views/item_handlers/PictureViewer.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'viewer/src/views/item_handlers/PictureViewer.vue') diff --git a/viewer/src/views/item_handlers/PictureViewer.vue b/viewer/src/views/item_handlers/PictureViewer.vue index 10055fd..74b978f 100644 --- a/viewer/src/views/item_handlers/PictureViewer.vue +++ b/viewer/src/views/item_handlers/PictureViewer.vue @@ -46,7 +46,7 @@ import { useLdZoom } from '@/services/ui/ldZoom'; import { useUiStore } from '@/store/uiStore'; import { unrefElement, VueInstance } from '@vueuse/core'; import { createToast } from 'mosha-vue-toastify'; -import { CSSProperties, onMounted, onUnmounted, PropType, ref } from 'vue'; +import { CSSProperties, onMounted, onUnmounted, PropType, ref, toRef } from 'vue'; import { useI18n } from 'vue-i18n'; const props = defineProps({ @@ -63,7 +63,7 @@ const loader = ref(false); const containerElement = ref(); const imageElement = ref(); -const { itemResourceUrl, thumbnailResourceUrl } = useItemResource(props.item); +const { itemResourceUrl, thumbnailResourceUrl } = useItemResource(toRef(props, 'item')); onMounted(() => { generateSlowLoadingStyle(); -- cgit v1.2.3