aboutsummaryrefslogtreecommitdiff
path: root/viewer/src
diff options
context:
space:
mode:
authorpacien2020-05-04 00:10:39 +0200
committerpacien2020-05-04 00:10:39 +0200
commitf328a730b516f5e9104f85e553c083c2865660a8 (patch)
treecf665afc3bcbbc42504c0270f76814f7489fb21d /viewer/src
parent665139f7d25a64f66e1149a6403fc26efcbabb2a (diff)
downloadldgallery-f328a730b516f5e9104f85e553c083c2865660a8.tar.gz
viewer/galleryStore: unify resource root parametrisation
Diffstat (limited to 'viewer/src')
-rw-r--r--viewer/src/components/LdPicture.vue2
-rw-r--r--viewer/src/components/LdThumbnail.vue2
-rw-r--r--viewer/src/store/galleryStore.ts4
3 files changed, 6 insertions, 2 deletions
diff --git a/viewer/src/components/LdPicture.vue b/viewer/src/components/LdPicture.vue
index de46bcb..78829ec 100644
--- a/viewer/src/components/LdPicture.vue
+++ b/viewer/src/components/LdPicture.vue
@@ -76,7 +76,7 @@ export default class LdPicture extends Vue {
76 } 76 }
77 77
78 pictureSrc(resource: string) { 78 pictureSrc(resource: string) {
79 return `${process.env.VUE_APP_DATA_URL}${this.$galleryStore.config!.galleryRoot}${resource}`; 79 return this.$galleryStore.resourceRoot + resource;
80 } 80 }
81 81
82 generateSlowLoadingStyle() { 82 generateSlowLoadingStyle() {
diff --git a/viewer/src/components/LdThumbnail.vue b/viewer/src/components/LdThumbnail.vue
index e774f00..bfcc595 100644
--- a/viewer/src/components/LdThumbnail.vue
+++ b/viewer/src/components/LdThumbnail.vue
@@ -47,7 +47,7 @@ export default class LdThumbnail extends Vue {
47 loading: boolean = false; 47 loading: boolean = false;
48 48
49 pictureSrc(resource: string) { 49 pictureSrc(resource: string) {
50 return `${process.env.VUE_APP_DATA_URL}${this.$galleryStore.config!.galleryRoot}${resource}`; 50 return this.$galleryStore.resourceRoot + resource;
51 } 51 }
52 52
53 pictureStyle() { 53 pictureStyle() {
diff --git a/viewer/src/store/galleryStore.ts b/viewer/src/store/galleryStore.ts
index 0cffdd9..a57122c 100644
--- a/viewer/src/store/galleryStore.ts
+++ b/viewer/src/store/galleryStore.ts
@@ -79,6 +79,10 @@ export default class GalleryStore extends VuexModule {
79 return this.galleryIndex?.properties.galleryTitle ?? "ldgallery"; 79 return this.galleryIndex?.properties.galleryTitle ?? "ldgallery";
80 } 80 }
81 81
82 get resourceRoot(): string {
83 return process.env.VUE_APP_DATA_URL + this.config!.galleryRoot;
84 }
85
82 // --- 86 // ---
83 87
84 // Fetches the gallery's JSON config 88 // Fetches the gallery's JSON config