aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/views/item_handlers/AudioViewer.vue
diff options
context:
space:
mode:
authorZéro~Informatique2022-11-06 19:34:26 +0100
committerZéro~Informatique2022-11-06 19:41:44 +0100
commitcfbff75f78963e3d24326f731590e78a4d719e9e (patch)
tree2e5436e819f8e93a1115a8142594ca80fd507bc1 /viewer/src/views/item_handlers/AudioViewer.vue
parent12eb302bcc93405f81b676b1a29a9731a5fec9be (diff)
downloadldgallery-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/AudioViewer.vue')
-rw-r--r--viewer/src/views/item_handlers/AudioViewer.vue4
1 files changed, 2 insertions, 2 deletions
diff --git a/viewer/src/views/item_handlers/AudioViewer.vue b/viewer/src/views/item_handlers/AudioViewer.vue
index bbba7e5..124d132 100644
--- a/viewer/src/views/item_handlers/AudioViewer.vue
+++ b/viewer/src/views/item_handlers/AudioViewer.vue
@@ -43,7 +43,7 @@
43import { AudioItem } from '@/@types/gallery'; 43import { AudioItem } from '@/@types/gallery';
44import { useNavigation } from '@/services/navigation'; 44import { useNavigation } from '@/services/navigation';
45import { useItemResource } from '@/services/ui/ldItemResourceUrl'; 45import { useItemResource } from '@/services/ui/ldItemResourceUrl';
46import { computed, PropType } from 'vue'; 46import { computed, PropType, toRef } from 'vue';
47import { useI18n } from 'vue-i18n'; 47import { useI18n } from 'vue-i18n';
48import ItemThumbnail from '../ItemThumbnail.vue'; 48import ItemThumbnail from '../ItemThumbnail.vue';
49 49
@@ -54,7 +54,7 @@ const props = defineProps({
54const { t } = useI18n(); 54const { t } = useI18n();
55const navigation = useNavigation(); 55const navigation = useNavigation();
56 56
57const { itemResourceUrl } = useItemResource(props.item); 57const { itemResourceUrl } = useItemResource(toRef(props, 'item'));
58const itemFileName = computed(() => navigation.getFileName(props.item)); 58const itemFileName = computed(() => navigation.getFileName(props.item));
59</script> 59</script>
60 60