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/LdGallery.vue | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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

diff --git a/viewer/src/components/LdGallery.vue b/viewer/src/components/LdGallery.vue
index e512758..5a72d99 100644
--- a/viewer/src/components/LdGallery.vue
+++ b/viewer/src/components/LdGallery.vue
@@ -18,7 +18,7 @@
 -->
 
 <template>
-  <ld-error v-if="hasNoResults()" icon="search" :message="noresult" />
+  <ld-error v-if="hasNoResults" icon="search" :message="noresult" />
   <div v-else class="thumbnail-tiles">
     <router-link v-for="item in items" :key="item.path" :to="item.path">
       <ld-thumbnail :item="item" />
@@ -35,7 +35,7 @@ export default class LdPicture extends Vue {
   @Prop({ type: Array, required: true }) readonly items!: Gallery.Item[];
   @Prop(String) readonly noresult?: string;
 
-  hasNoResults(): boolean {
+  get hasNoResults(): boolean {
     return Boolean(this.noresult) && this.items.length === 0;
   }
 }
-- 
cgit v1.2.3

