diff options
author | Zéro~Informatique | 2022-11-06 19:34:26 +0100 |
---|---|---|
committer | Zéro~Informatique | 2022-11-06 19:41:44 +0100 |
commit | cfbff75f78963e3d24326f731590e78a4d719e9e (patch) | |
tree | 2e5436e819f8e93a1115a8142594ca80fd507bc1 /viewer/src/views/item_handlers/PictureViewer.vue | |
parent | 12eb302bcc93405f81b676b1a29a9731a5fec9be (diff) | |
download | ldgallery-cfbff75f78963e3d24326f731590e78a4d719e9e.tar.gz |
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.
Diffstat (limited to 'viewer/src/views/item_handlers/PictureViewer.vue')
-rw-r--r-- | viewer/src/views/item_handlers/PictureViewer.vue | 4 |
1 files changed, 2 insertions, 2 deletions
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'; | |||
46 | import { useUiStore } from '@/store/uiStore'; | 46 | import { useUiStore } from '@/store/uiStore'; |
47 | import { unrefElement, VueInstance } from '@vueuse/core'; | 47 | import { unrefElement, VueInstance } from '@vueuse/core'; |
48 | import { createToast } from 'mosha-vue-toastify'; | 48 | import { createToast } from 'mosha-vue-toastify'; |
49 | import { CSSProperties, onMounted, onUnmounted, PropType, ref } from 'vue'; | 49 | import { CSSProperties, onMounted, onUnmounted, PropType, ref, toRef } from 'vue'; |
50 | import { useI18n } from 'vue-i18n'; | 50 | import { useI18n } from 'vue-i18n'; |
51 | 51 | ||
52 | const props = defineProps({ | 52 | const props = defineProps({ |
@@ -63,7 +63,7 @@ const loader = ref(false); | |||
63 | const containerElement = ref<HTMLDivElement>(); | 63 | const containerElement = ref<HTMLDivElement>(); |
64 | const imageElement = ref<VueInstance>(); | 64 | const imageElement = ref<VueInstance>(); |
65 | 65 | ||
66 | const { itemResourceUrl, thumbnailResourceUrl } = useItemResource(props.item); | 66 | const { itemResourceUrl, thumbnailResourceUrl } = useItemResource(toRef(props, 'item')); |
67 | 67 | ||
68 | onMounted(() => { | 68 | onMounted(() => { |
69 | generateSlowLoadingStyle(); | 69 | generateSlowLoadingStyle(); |