aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/services
diff options
context:
space:
mode:
authorpacien2020-02-27 21:05:51 +0100
committerNotkea2020-02-27 21:36:39 +0100
commitc7fa5bd40d0e5c9ea50190a90a0ccfee8ad96c25 (patch)
tree6c524899070301a13c7ce03bc6640d9c266bed71 /viewer/src/services
parent8f041b9f13b4c043acc7720aa4c082583b52ffe1 (diff)
downloadldgallery-c7fa5bd40d0e5c9ea50190a90a0ccfee8ad96c25.tar.gz
viewer: use colon as tag separator instead of dot
For consistency with the query language and allowing the use of the very common dot in tags. This also introduces a migration script. GitHub: closes #164
Diffstat (limited to 'viewer/src/services')
-rw-r--r--viewer/src/services/indexfactory.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/viewer/src/services/indexfactory.ts b/viewer/src/services/indexfactory.ts
index a6bc865..6fed6cc 100644
--- a/viewer/src/services/indexfactory.ts
+++ b/viewer/src/services/indexfactory.ts
@@ -36,7 +36,7 @@ export default class IndexFactory {
36 return; // Directories are not indexed 36 return; // Directories are not indexed
37 } 37 }
38 for (const tag of item.tags) { 38 for (const tag of item.tags) {
39 const parts = tag.split('.'); 39 const parts = tag.split(':');
40 let lastPart: string | null = null; 40 let lastPart: string | null = null;
41 for (const part of parts) { 41 for (const part of parts) {
42 if (!tagsIndex[part]) tagsIndex[part] = { tag: part, tagfiltered: Navigation.normalize(part), items: [], children: {} }; 42 if (!tagsIndex[part]) tagsIndex[part] = { tag: part, tagfiltered: Navigation.normalize(part), items: [], children: {} };