From c4a51940295d514dd52f48b6f18638ac554224f4 Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Wed, 29 Jan 2020 05:35:35 +0100
Subject: viewer: Tag auto-completion should be more flexible. Resolves #38
---
viewer/src/components/LdTagInput.vue | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
(limited to 'viewer/src/components/LdTagInput.vue')
diff --git a/viewer/src/components/LdTagInput.vue b/viewer/src/components/LdTagInput.vue
index 71131e6..7c9981f 100644
--- a/viewer/src/components/LdTagInput.vue
+++ b/viewer/src/components/LdTagInput.vue
@@ -42,6 +42,7 @@
--
cgit v1.2.3
From 170da2d55fec0359cbac780786383710b734eda7 Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Fri, 31 Jan 2020 09:17:57 +0100
Subject: viewer: code cleaning, moved some views to components
---
viewer/src/components/LdTagInput.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'viewer/src/components/LdTagInput.vue')
diff --git a/viewer/src/components/LdTagInput.vue b/viewer/src/components/LdTagInput.vue
index 7bbecec..eff02e6 100644
--- a/viewer/src/components/LdTagInput.vue
+++ b/viewer/src/components/LdTagInput.vue
@@ -40,7 +40,7 @@
--
cgit v1.2.3
From 4565feaf9ccdc9b215e85f22917bbe300f3a57c4 Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Thu, 27 Feb 2020 12:58:19 +0100
Subject: viewer: removing a tag from the filters opens the keyboard on mobile
Changed the anchor event to trigger on capture instead of bubbling. This fixes a race-condition on some browsers.
---
viewer/src/components/LdTagInput.vue | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
(limited to 'viewer/src/components/LdTagInput.vue')
diff --git a/viewer/src/components/LdTagInput.vue b/viewer/src/components/LdTagInput.vue
index 34d96bd..ad0845e 100644
--- a/viewer/src/components/LdTagInput.vue
+++ b/viewer/src/components/LdTagInput.vue
@@ -63,8 +63,7 @@ export default class LdTagInput extends Vue {
// Prevents the keyboard from opening on mobile when removing a tag
onClick(e: MouseEvent) {
const target = e.target;
- if (target instanceof HTMLAnchorElement)
- target.addEventListener("click", e => e.stopPropagation());
+ if (target instanceof HTMLAnchorElement) target.addEventListener("click", e => e.stopPropagation(), true);
}
}
--
cgit v1.2.3
From 7c2a2ff46469d5e8f44fb3ec7feae5f798e0baf8 Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Thu, 27 Feb 2020 17:23:32 +0100
Subject: viewer: architectural fixes and improvements
Make use of VueX's strict mode (which is different from vuex-class-component strict mode)
Fixed issues and bad-practices with search filter tags mutations
Correctly implement the new index.json format
---
viewer/src/components/LdTagInput.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'viewer/src/components/LdTagInput.vue')
diff --git a/viewer/src/components/LdTagInput.vue b/viewer/src/components/LdTagInput.vue
index ad0845e..b2a2c58 100644
--- a/viewer/src/components/LdTagInput.vue
+++ b/viewer/src/components/LdTagInput.vue
@@ -38,7 +38,7 @@
--
cgit v1.2.3
From 09ec37a772802980d68264f2fed040be36e14c82 Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Fri, 3 Apr 2020 21:57:19 +0200
Subject: viewer: tag categories implementation
fixed disambiguation by categories following code review
GitHub: Resolves #29
---
viewer/src/components/LdTagInput.vue | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
(limited to 'viewer/src/components/LdTagInput.vue')
diff --git a/viewer/src/components/LdTagInput.vue b/viewer/src/components/LdTagInput.vue
index bdb07bc..865db96 100644
--- a/viewer/src/components/LdTagInput.vue
+++ b/viewer/src/components/LdTagInput.vue
@@ -54,9 +54,16 @@ export default class LdTagInput extends Vue {
return `${option.display} (${option.items.length})`;
}
+ filterAlreadyPresent(newSearch: Tag.Search) {
+ return !this.model.find(
+ currentSearch =>
+ currentSearch.tag === newSearch.tag && (!currentSearch.parent || currentSearch.parent === newSearch.parent)
+ );
+ }
+
searchTags(filter: string) {
this.filteredTags = IndexFactory.searchTags(this.tagsIndex, filter, false)
- .filter(newSearch => !this.model.find(currentSearch => currentSearch.tag === newSearch.tag))
+ .filter(this.filterAlreadyPresent)
.sort((a, b) => b.items.length - a.items.length);
}
--
cgit v1.2.3