aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/components/LdProposition.vue
diff options
context:
space:
mode:
authorpacien2020-02-27 21:05:51 +0100
committerNotkea2020-02-27 21:36:39 +0100
commitc7fa5bd40d0e5c9ea50190a90a0ccfee8ad96c25 (patch)
tree6c524899070301a13c7ce03bc6640d9c266bed71 /viewer/src/components/LdProposition.vue
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/components/LdProposition.vue')
-rw-r--r--viewer/src/components/LdProposition.vue4
1 files changed, 2 insertions, 2 deletions
diff --git a/viewer/src/components/LdProposition.vue b/viewer/src/components/LdProposition.vue
index 375c482..3357777 100644
--- a/viewer/src/components/LdProposition.vue
+++ b/viewer/src/components/LdProposition.vue
@@ -74,7 +74,7 @@ export default class LdProposition extends Vue {
74 } else { 74 } else {
75 // Tags count from the current directory 75 // Tags count from the current directory
76 this.currentTags 76 this.currentTags
77 .flatMap(tag => tag.split(".")) 77 .flatMap(tag => tag.split(":"))
78 .map(tag => this.tagsIndex[tag]) 78 .map(tag => this.tagsIndex[tag])
79 .forEach(tagindex => (propositions[tagindex.tag] = tagindex.items.length)); 79 .forEach(tagindex => (propositions[tagindex.tag] = tagindex.items.length));
80 } 80 }
@@ -89,7 +89,7 @@ export default class LdProposition extends Vue {
89 } 89 }
90 90
91 rightmost(tag: Gallery.RawTag): Gallery.RawTag { 91 rightmost(tag: Gallery.RawTag): Gallery.RawTag {
92 const dot = tag.lastIndexOf("."); 92 const dot = tag.lastIndexOf(":");
93 return dot <= 0 ? tag : tag.substr(dot + 1); 93 return dot <= 0 ? tag : tag.substr(dot + 1);
94 } 94 }
95 95