From 09624c0089f0e29ffb1abc578525b6a07fd95e81 Mon Sep 17 00:00:00 2001
From: pacien
Date: Sun, 3 May 2020 23:05:38 +0200
Subject: viewer/GallerySearch: use proper i18n pluralisation

---
 viewer/src/views/GallerySearch.vue | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

(limited to 'viewer/src/views/GallerySearch.vue')

diff --git a/viewer/src/views/GallerySearch.vue b/viewer/src/views/GallerySearch.vue
index e75a37e..dfaa5d3 100644
--- a/viewer/src/views/GallerySearch.vue
+++ b/viewer/src/views/GallerySearch.vue
@@ -29,8 +29,7 @@ import IndexSearch from "@/services/indexsearch";
 @Component
 export default class GalleryPicture extends Vue {
   @Prop(String) readonly path!: string;
-
-  otherCount: Number = 0;
+  otherCount: number = 0;
 
   mounted() {
     this.$uiStore.toggleFullscreen(false);
@@ -50,8 +49,7 @@ export default class GalleryPicture extends Vue {
   }
 
   noResult() {
-    const params = [this.otherCount, this.otherCount > 1 ? "s" : ""];
-    return this.$t("search.no-results.otherfolders", params);
+    return this.$tc("search.no-result-fmt", this.otherCount, [this.otherCount]);
   }
 }
 </script>
-- 
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/views/GallerySearch.vue | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'viewer/src/views/GallerySearch.vue')

diff --git a/viewer/src/views/GallerySearch.vue b/viewer/src/views/GallerySearch.vue
index dfaa5d3..4b98cea 100644
--- a/viewer/src/views/GallerySearch.vue
+++ b/viewer/src/views/GallerySearch.vue
@@ -18,7 +18,7 @@
 -->
 
 <template>
-  <ld-gallery :items="items()" :noresult="noResult()" />
+  <ld-gallery :items="items" :noresult="noResult" />
 </template>
 
 <script lang="ts">
@@ -41,14 +41,14 @@ export default class GalleryPicture extends Vue {
     this.$galleryStore.setCurrentSearch([]);
   }
 
-  items() {
+  get items() {
     const searchResult = IndexSearch.search(this.$galleryStore.currentSearch);
     const filteredByPath = searchResult.filter(item => item.path.startsWith(this.path));
     this.otherCount = searchResult.length - filteredByPath.length;
     return filteredByPath;
   }
 
-  noResult() {
+  get noResult() {
     return this.$tc("search.no-result-fmt", this.otherCount, [this.otherCount]);
   }
 }
-- 
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/views/GallerySearch.vue | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'viewer/src/views/GallerySearch.vue')

diff --git a/viewer/src/views/GallerySearch.vue b/viewer/src/views/GallerySearch.vue
index 4b98cea..fec7216 100644
--- a/viewer/src/views/GallerySearch.vue
+++ b/viewer/src/views/GallerySearch.vue
@@ -54,5 +54,4 @@ export default class GalleryPicture extends Vue {
 }
 </script>
 
-<style lang="scss">
-</style>
+<style lang="scss"></style>
-- 
cgit v1.2.3

