diff options
Diffstat (limited to 'viewer/src/components/LdPicture.vue')
-rw-r--r-- | viewer/src/components/LdPicture.vue | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/viewer/src/components/LdPicture.vue b/viewer/src/components/LdPicture.vue index 8a9a08e..a5faeb3 100644 --- a/viewer/src/components/LdPicture.vue +++ b/viewer/src/components/LdPicture.vue | |||
@@ -28,7 +28,7 @@ | |||
28 | @dragscrollend="dragScrollClickFix.onDragScrollEnd()" | 28 | @dragscrollend="dragScrollClickFix.onDragScrollEnd()" |
29 | > | 29 | > |
30 | <v-lazy-image | 30 | <v-lazy-image |
31 | :src="pictureSrc()" | 31 | :src="pictureSrc(picture.properties.resource)" |
32 | :class="{'slow-loading': Boolean(slowLoadingStyle)}" | 32 | :class="{'slow-loading': Boolean(slowLoadingStyle)}" |
33 | :style="slowLoadingStyle" | 33 | :style="slowLoadingStyle" |
34 | @load="clearSlowLoading" | 34 | @load="clearSlowLoading" |
@@ -67,15 +67,17 @@ export default class LdPicture extends Vue { | |||
67 | this.loader = false; | 67 | this.loader = false; |
68 | } | 68 | } |
69 | 69 | ||
70 | pictureSrc() { | 70 | pictureSrc(resource: string) { |
71 | return `${process.env.VUE_APP_DATA_URL}${this.picture.properties.resource}`; | 71 | return `${process.env.VUE_APP_DATA_URL}${this.$galleryStore.config!.galleryRoot}${resource}`; |
72 | } | 72 | } |
73 | 73 | ||
74 | generateSlowLoadingStyle() { | 74 | generateSlowLoadingStyle() { |
75 | this.clearSlowLoading(); | 75 | this.clearSlowLoading(); |
76 | this.loader = true; | 76 | this.loader = true; |
77 | if (this.picture.thumbnail) | 77 | if (this.picture.thumbnail) { |
78 | this.slowLoadingStyle = `background-image: url('${process.env.VUE_APP_DATA_URL}${this.picture.thumbnail.resource}');`; | 78 | const url = this.pictureSrc(this.picture.thumbnail.resource); |
79 | this.slowLoadingStyle = `background-image: url('${url}');`; | ||
80 | } | ||
79 | } | 81 | } |
80 | } | 82 | } |
81 | </script> | 83 | </script> |