From f328a730b516f5e9104f85e553c083c2865660a8 Mon Sep 17 00:00:00 2001
From: pacien
Date: Mon, 4 May 2020 00:10:39 +0200
Subject: viewer/galleryStore: unify resource root parametrisation

---
 viewer/src/components/LdThumbnail.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'viewer/src/components/LdThumbnail.vue')

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 {
   loading: boolean = false;
 
   pictureSrc(resource: string) {
-    return `${process.env.VUE_APP_DATA_URL}${this.$galleryStore.config!.galleryRoot}${resource}`;
+    return this.$galleryStore.resourceRoot + resource;
   }
 
   pictureStyle() {
-- 
cgit v1.2.3


From 69dc0d20706ed41e5ecdbb77515066d8a7d7703b Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Fri, 19 Jun 2020 22:12:03 +0200
Subject: viewer: code update (no functional change)

Types { [x: T]: R } updated to Record<T, R>
Methods in template updated to getters (computed in VueJS), which are reactive and cached
Code formatting
---
 viewer/src/components/LdThumbnail.vue | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'viewer/src/components/LdThumbnail.vue')

diff --git a/viewer/src/components/LdThumbnail.vue b/viewer/src/components/LdThumbnail.vue
index bfcc595..0ddeb6b 100644
--- a/viewer/src/components/LdThumbnail.vue
+++ b/viewer/src/components/LdThumbnail.vue
@@ -22,14 +22,14 @@
     <v-lazy-image
       v-if="item.thumbnail"
       :src="pictureSrc(item.thumbnail.resource)"
-      :style="pictureStyle()"
+      :style="pictureStyle"
       :title="item.title"
       @intersect="loading=true"
       @load="loading=false"
     />
     <div v-else class="thumbnail-other flex-column flex-center">
       <div>
-        <fa-icon :icon="getIcon()" size="4x" />
+        <fa-icon :icon="icon" size="4x" />
       </div>
       {{item.title}}
     </div>
@@ -50,12 +50,12 @@ export default class LdThumbnail extends Vue {
     return this.$galleryStore.resourceRoot + resource;
   }
 
-  pictureStyle() {
+  get pictureStyle() {
     const resolution = this.item.thumbnail!.resolution;
     return { width: `${resolution.width}px`, height: `${resolution.height}px` };
   }
 
-  getIcon() {
+  get icon() {
     return Navigation.getIcon(this.item);
   }
 }
-- 
cgit v1.2.3


From 170d7a61f720ece9dc4b347b19f5a8213f1d8984 Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Sat, 20 Jun 2020 16:50:49 +0200
Subject: viewer: prettier formatting based on eslint-prettier plugin

---
 viewer/src/components/LdThumbnail.vue | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'viewer/src/components/LdThumbnail.vue')

diff --git a/viewer/src/components/LdThumbnail.vue b/viewer/src/components/LdThumbnail.vue
index 0ddeb6b..5b1bc82 100644
--- a/viewer/src/components/LdThumbnail.vue
+++ b/viewer/src/components/LdThumbnail.vue
@@ -18,20 +18,20 @@
 -->
 
 <template>
-  <div :class="{'preload': loading}">
+  <div :class="{ preload: loading }">
     <v-lazy-image
       v-if="item.thumbnail"
       :src="pictureSrc(item.thumbnail.resource)"
       :style="pictureStyle"
       :title="item.title"
-      @intersect="loading=true"
-      @load="loading=false"
+      @intersect="loading = true"
+      @load="loading = false"
     />
     <div v-else class="thumbnail-other flex-column flex-center">
       <div>
         <fa-icon :icon="icon" size="4x" />
       </div>
-      {{item.title}}
+      {{ item.title }}
     </div>
   </div>
 </template>
-- 
cgit v1.2.3

