aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/components
diff options
context:
space:
mode:
authorZero~Informatique2020-02-13 18:17:35 +0100
committerZero~Informatique2020-02-13 18:17:35 +0100
commit6c51a97bce7963fba47892602c1214b3bcdcd410 (patch)
tree0df87fda5a480718cf35b6087555039a706df524 /viewer/src/components
parent9c2af5dcd2d2c8754e4c74e02141822c0964a5a8 (diff)
parentef1778e051e007f08f9188a479d04fdf95a57d21 (diff)
downloadldgallery-6c51a97bce7963fba47892602c1214b3bcdcd410.tar.gz
Merge branch 'oz-config-json' into develop
# Conflicts: # scripts/win_compile_example.cmd
Diffstat (limited to 'viewer/src/components')
-rw-r--r--viewer/src/components/LdPicture.vue12
-rw-r--r--viewer/src/components/LdThumbnail.vue7
2 files changed, 10 insertions, 9 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>
diff --git a/viewer/src/components/LdThumbnail.vue b/viewer/src/components/LdThumbnail.vue
index 17c7659..13468e1 100644
--- a/viewer/src/components/LdThumbnail.vue
+++ b/viewer/src/components/LdThumbnail.vue
@@ -21,7 +21,7 @@
21 <div :class="{'preload': loading}"> 21 <div :class="{'preload': loading}">
22 <v-lazy-image 22 <v-lazy-image
23 v-if="item.thumbnail" 23 v-if="item.thumbnail"
24 :src="pictureSrc()" 24 :src="pictureSrc(item.thumbnail.resource)"
25 :style="pictureStyle()" 25 :style="pictureStyle()"
26 :title="item.title" 26 :title="item.title"
27 @intersect="loading=true" 27 @intersect="loading=true"
@@ -44,9 +44,8 @@ export default class LdThumbnail extends Vue {
44 44
45 loading: boolean = false; 45 loading: boolean = false;
46 46
47 pictureSrc() { 47 pictureSrc(resource: string) {
48 const resource = this.item.thumbnail!.resource; 48 return `${process.env.VUE_APP_DATA_URL}${this.$galleryStore.config!.galleryRoot}${resource}`;
49 return `${process.env.VUE_APP_DATA_URL}${resource}`;
50 } 49 }
51 50
52 pictureStyle() { 51 pictureStyle() {