aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/views/GallerySearch.vue
diff options
context:
space:
mode:
Diffstat (limited to 'viewer/src/views/GallerySearch.vue')
-rw-r--r--viewer/src/views/GallerySearch.vue6
1 files changed, 3 insertions, 3 deletions
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 @@
18--> 18-->
19 19
20<template> 20<template>
21 <ld-gallery :items="items()" :noresult="noResult()" /> 21 <ld-gallery :items="items" :noresult="noResult" />
22</template> 22</template>
23 23
24<script lang="ts"> 24<script lang="ts">
@@ -41,14 +41,14 @@ export default class GalleryPicture extends Vue {
41 this.$galleryStore.setCurrentSearch([]); 41 this.$galleryStore.setCurrentSearch([]);
42 } 42 }
43 43
44 items() { 44 get items() {
45 const searchResult = IndexSearch.search(this.$galleryStore.currentSearch); 45 const searchResult = IndexSearch.search(this.$galleryStore.currentSearch);
46 const filteredByPath = searchResult.filter(item => item.path.startsWith(this.path)); 46 const filteredByPath = searchResult.filter(item => item.path.startsWith(this.path));
47 this.otherCount = searchResult.length - filteredByPath.length; 47 this.otherCount = searchResult.length - filteredByPath.length;
48 return filteredByPath; 48 return filteredByPath;
49 } 49 }
50 50
51 noResult() { 51 get noResult() {
52 return this.$tc("search.no-result-fmt", this.otherCount, [this.otherCount]); 52 return this.$tc("search.no-result-fmt", this.otherCount, [this.otherCount]);
53 } 53 }
54} 54}