aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/services
diff options
context:
space:
mode:
authorZero~Informatique2020-02-27 17:42:24 +0100
committerZero~Informatique2020-02-27 18:30:33 +0100
commit4641f35baebd618ec51fa549adf64670c31c647f (patch)
treeeec84231d3c4fbe470e93b98333238f212ba7b27 /viewer/src/services
parent3e27a3cfa35359f6ffa83843aa2f2ad53f42f1d4 (diff)
downloadldgallery-4641f35baebd618ec51fa549adf64670c31c647f.tar.gz
viewer: added a count of results found in other folders when no-results are found
Diffstat (limited to 'viewer/src/services')
-rw-r--r--viewer/src/services/indexsearch.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/viewer/src/services/indexsearch.ts b/viewer/src/services/indexsearch.ts
index 3e73fb1..cd3383a 100644
--- a/viewer/src/services/indexsearch.ts
+++ b/viewer/src/services/indexsearch.ts
@@ -22,12 +22,11 @@ import { Operation } from '@/@types/Operation';
22export default class IndexSearch { 22export default class IndexSearch {
23 23
24 // Results of the search (by tags) 24 // Results of the search (by tags)
25 public static search(searchTags: Tag.Search[], rootPath: string): Gallery.Item[] { 25 public static search(searchTags: Tag.Search[]): Gallery.Item[] {
26 const byOperation = this.extractTagsByOperation(searchTags); 26 const byOperation = this.extractTagsByOperation(searchTags);
27 const intersection = this.extractIntersection(byOperation); 27 const intersection = this.extractIntersection(byOperation);
28 const substraction = this.extractSubstraction(byOperation); 28 const substraction = this.extractSubstraction(byOperation);
29 return this.aggregateAll(byOperation, intersection, substraction) 29 return this.aggregateAll(byOperation, intersection, substraction);
30 .filter(item => item.path.startsWith(rootPath));
31 } 30 }
32 31
33 private static extractTagsByOperation(searchTags: Tag.Search[]): Tag.SearchByOperation { 32 private static extractTagsByOperation(searchTags: Tag.Search[]): Tag.SearchByOperation {