diff options
author | pacien | 2023-02-17 22:57:38 +0100 |
---|---|---|
committer | pacien | 2023-02-17 22:57:38 +0100 |
commit | 46cd42de44e402fbf33522d999fa2649729ffaa8 (patch) | |
tree | 1281beefda5d9b6d2411bc47ec1327fbf0b38dde /viewer/src/services/ui | |
parent | 11bbbae2850b9c45da697a8ed9626495a50a38c0 (diff) | |
parent | e939712a284dff9af6d81cc1fcd4e7f7ec9ad503 (diff) | |
download | ldgallery-46cd42de44e402fbf33522d999fa2649729ffaa8.tar.gz |
Merge branch 'develop': release v2.2v2.2
Diffstat (limited to 'viewer/src/services/ui')
-rw-r--r-- | viewer/src/services/ui/ldItemResourceUrl.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/viewer/src/services/ui/ldItemResourceUrl.ts b/viewer/src/services/ui/ldItemResourceUrl.ts index 7db7ab9..d6734b3 100644 --- a/viewer/src/services/ui/ldItemResourceUrl.ts +++ b/viewer/src/services/ui/ldItemResourceUrl.ts | |||
@@ -1,12 +1,12 @@ | |||
1 | import { Item } from '@/@types/gallery'; | 1 | import { Item } from '@/@types/gallery'; |
2 | import { useGalleryStore } from '@/store/galleryStore'; | 2 | import { useGalleryStore } from '@/store/galleryStore'; |
3 | import { computed } from 'vue'; | 3 | import { computed, ToRef } from 'vue'; |
4 | import { isDownloadableItem } from '../itemGuards'; | 4 | import { isDownloadableItem } from '../itemGuards'; |
5 | 5 | ||
6 | export const useItemResource = (item: Item) => { | 6 | export const useItemResource = (item: ToRef<Item>) => { |
7 | const galleryStore = useGalleryStore(); | 7 | const galleryStore = useGalleryStore(); |
8 | const itemResourceUrl = computed(() => isDownloadableItem(item) ? galleryStore.resourceRoot + item.properties.resource : ''); | 8 | const itemResourceUrl = computed(() => isDownloadableItem(item.value) ? galleryStore.resourceRoot + item.value.properties.resource : ''); |
9 | const thumbnailResourceUrl = computed(() => item.thumbnail ? galleryStore.resourceRoot + item.thumbnail.resource : ''); | 9 | const thumbnailResourceUrl = computed(() => item.value.thumbnail ? galleryStore.resourceRoot + item.value.thumbnail.resource : ''); |
10 | 10 | ||
11 | return { | 11 | return { |
12 | itemResourceUrl, | 12 | itemResourceUrl, |