From 42105af46681d81959a5d5a9a16ec9e98463a92e Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Thu, 30 Jan 2020 21:24:15 +0100
Subject: viewer: new breadcrumb. navigation buttons. and styling improvements

---
 viewer/src/views/PanelLeft.vue | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

(limited to 'viewer/src/views/PanelLeft.vue')

diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue
index 16be249..35c092a 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -24,7 +24,7 @@
     <h1>{{$t('panelLeft.filters')}}</h1>
     <ld-tag-input />
     <h1>{{$t('panelLeft.propositions')}}</h1>
-    <ld-proposition />
+    <ld-proposition class="scrollbar" />
   </div>
 </template>
 
@@ -36,7 +36,4 @@ export default class PanelLeft extends Vue {}
 </script>
 
 <style lang="scss">
-.label {
-  color: white;
-}
 </style>
-- 
cgit v1.2.3


From 17b1598c5a5a375e6eaa0763767368c05ba0f56e Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Thu, 30 Jan 2020 22:58:27 +0100
Subject: viewer: Improved the proposition layout

---
 viewer/src/views/PanelLeft.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'viewer/src/views/PanelLeft.vue')

diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue
index 35c092a..ea35664 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -24,7 +24,7 @@
     <h1>{{$t('panelLeft.filters')}}</h1>
     <ld-tag-input />
     <h1>{{$t('panelLeft.propositions')}}</h1>
-    <ld-proposition class="scrollbar" />
+    <ld-proposition class="scrollbar no-scroll-x" />
   </div>
 </template>
 
-- 
cgit v1.2.3


From 675f007d85a69d89a9252d980562509f224d4b29 Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Mon, 10 Feb 2020 15:20:13 +0100
Subject: viewer: re-applied changes which were eaten by the big Eldrich
 monster

---
 viewer/src/views/PanelLeft.vue | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'viewer/src/views/PanelLeft.vue')

diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue
index ea35664..2c00bbf 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -19,11 +19,11 @@
 
 <template>
   <div class="flex-column">
-    <h1>{{$t('panelLeft.mode')}}</h1>
-    <ld-mode-radio />
-    <h1>{{$t('panelLeft.filters')}}</h1>
     <ld-tag-input />
-    <h1>{{$t('panelLeft.propositions')}}</h1>
+    <!-- TODO: Remove when #21 is resolved -->
+    <ld-mode-radio />
+    <!-- === -->
+    <h1 class="title">{{$t('panelLeft.propositions')}}</h1>
     <ld-proposition class="scrollbar no-scroll-x" />
   </div>
 </template>
-- 
cgit v1.2.3


From 95f75d95c12e95fd5c54c2203e031b0a593c7550 Mon Sep 17 00:00:00 2001
From: pacien
Date: Mon, 10 Feb 2020 20:13:50 +0100
Subject: viewer: move temporary mode selector

Out of the sidebar so we can continue polishing the interface without interference.
---
 viewer/src/views/PanelLeft.vue | 3 ---
 1 file changed, 3 deletions(-)

(limited to 'viewer/src/views/PanelLeft.vue')

diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue
index 2c00bbf..91d193c 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -20,9 +20,6 @@
 <template>
   <div class="flex-column">
     <ld-tag-input />
-    <!-- TODO: Remove when #21 is resolved -->
-    <ld-mode-radio />
-    <!-- === -->
     <h1 class="title">{{$t('panelLeft.propositions')}}</h1>
     <ld-proposition class="scrollbar no-scroll-x" />
   </div>
-- 
cgit v1.2.3


From 85950b42384d315f74a4e6b1077618cd557bb15a Mon Sep 17 00:00:00 2001
From: pacien
Date: Mon, 10 Feb 2020 20:20:25 +0100
Subject: viewer: sidebar: self-contain style

We'll polish that later when groups are done.
For now let's have this styling self-contained.
---
 viewer/src/views/PanelLeft.vue | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'viewer/src/views/PanelLeft.vue')

diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue
index 91d193c..a61fe4a 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -18,7 +18,7 @@
 -->
 
 <template>
-  <div class="flex-column">
+  <div class="flex-column sidebar">
     <ld-tag-input />
     <h1 class="title">{{$t('panelLeft.propositions')}}</h1>
     <ld-proposition class="scrollbar no-scroll-x" />
@@ -33,4 +33,9 @@ export default class PanelLeft extends Vue {}
 </script>
 
 <style lang="scss">
+.sidebar {
+  .title {
+    margin: 0.2em 0.5em !important;
+  }
+}
 </style>
-- 
cgit v1.2.3


From 370e3db3455f548699ff5e046e0f8dcc304991ac Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Fri, 14 Feb 2020 09:19:53 +0100
Subject: viewer: major code and search mode overhaul

Updated libraries to the lastest version
SCSS Formatter as suggested VSC extensions
Renamed toolbar-color by scrollbar-color
LD components use Props in favor of touching the stores directly (when possible)
Moved most common algorithms to a "services" folder
Complete search overhaul (lots of code change)
---
 viewer/src/views/PanelLeft.vue | 34 +++++++++++++++++++++++++++++++---
 1 file changed, 31 insertions(+), 3 deletions(-)

(limited to 'viewer/src/views/PanelLeft.vue')

diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue
index a61fe4a..fd117a6 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -19,17 +19,45 @@
 
 <template>
   <div class="flex-column sidebar">
-    <ld-tag-input />
+    <ld-tag-input v-model="$uiStore.searchFilters" :tags-index="$galleryStore.tagsIndex" />
+    <ld-command-search @clear="clear" @search="search" />
     <h1 class="title">{{$t('panelLeft.propositions')}}</h1>
-    <ld-proposition class="scrollbar no-scroll-x" />
+    <ld-proposition
+      v-model="$uiStore.searchFilters"
+      :tags-index="$galleryStore.tagsIndex"
+      :current-tags="currentTags()"
+      class="scrollbar no-scroll-x"
+    />
   </div>
 </template>
 
 <script lang="ts">
 import { Component, Vue, Prop } from "vue-property-decorator";
+import { Dictionary } from "vue-router/types/router";
 
 @Component
-export default class PanelLeft extends Vue {}
+export default class PanelLeft extends Vue {
+  clear() {
+    this.$uiStore.searchFilters = [];
+    this.search();
+  }
+
+  search() {
+    this.$router.push({ query: this.serializeSearch() }).catch(err => {
+      if (err.name !== "NavigationDuplicated") throw err;
+    });
+  }
+
+  serializeSearch() {
+    let query: Dictionary<null> = {};
+    this.$uiStore.searchFilters.forEach(filter => (query[filter.display] = null));
+    return query;
+  }
+
+  currentTags() {
+    return this.$galleryStore.currentItem?.tags ?? [];
+  }
+}
 </script>
 
 <style lang="scss">
-- 
cgit v1.2.3


From b252a96d47529749bb1d5e7a8d06fb7ce284b4ee Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Sun, 23 Feb 2020 18:19:33 +0100
Subject: viewer: searching when viewing a picture will return to the parent
 directory

Code review fix
---
 viewer/src/views/PanelLeft.vue | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'viewer/src/views/PanelLeft.vue')

diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue
index fd117a6..eb921b7 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -34,6 +34,7 @@
 <script lang="ts">
 import { Component, Vue, Prop } from "vue-property-decorator";
 import { Dictionary } from "vue-router/types/router";
+import Navigation from "../services/navigation";
 
 @Component
 export default class PanelLeft extends Vue {
@@ -43,7 +44,8 @@ export default class PanelLeft extends Vue {
   }
 
   search() {
-    this.$router.push({ query: this.serializeSearch() }).catch(err => {
+    const lastDirectory = Navigation.getLastDirectory(this.$galleryStore.currentItemPath);
+    this.$router.push({ path: lastDirectory.path, query: this.serializeSearch() }).catch(err => {
       if (err.name !== "NavigationDuplicated") throw err;
     });
   }
-- 
cgit v1.2.3


From eb00c2a7874608f70ec7768eae8d006a22bc0a54 Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Sun, 23 Feb 2020 21:33:20 +0100
Subject: viewer: absolute path fix

---
 viewer/src/views/PanelLeft.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'viewer/src/views/PanelLeft.vue')

diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue
index eb921b7..6292e78 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -34,7 +34,7 @@
 <script lang="ts">
 import { Component, Vue, Prop } from "vue-property-decorator";
 import { Dictionary } from "vue-router/types/router";
-import Navigation from "../services/navigation";
+import Navigation from "@/services/navigation";
 
 @Component
 export default class PanelLeft extends Vue {
-- 
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/views/PanelLeft.vue | 29 +++++++++++++++++++++++------
 1 file changed, 23 insertions(+), 6 deletions(-)

(limited to 'viewer/src/views/PanelLeft.vue')

diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue
index 6292e78..54b9c63 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -19,11 +19,11 @@
 
 <template>
   <div class="flex-column sidebar">
-    <ld-tag-input v-model="$uiStore.searchFilters" :tags-index="$galleryStore.tagsIndex" />
+    <ld-tag-input :search-filters.sync="searchFilters" :tags-index="$galleryStore.tagsIndex" />
     <ld-command-search @clear="clear" @search="search" />
     <h1 class="title">{{$t('panelLeft.propositions')}}</h1>
     <ld-proposition
-      v-model="$uiStore.searchFilters"
+      :search-filters.sync="searchFilters"
       :tags-index="$galleryStore.tagsIndex"
       :current-tags="currentTags()"
       class="scrollbar no-scroll-x"
@@ -32,14 +32,21 @@
 </template>
 
 <script lang="ts">
-import { Component, Vue, Prop } from "vue-property-decorator";
-import { Dictionary } from "vue-router/types/router";
+import { Component, Vue, Prop, Watch } from "vue-property-decorator";
+import { Dictionary, Route } from "vue-router/types/router";
 import Navigation from "@/services/navigation";
+import IndexFactory from "@/services/indexfactory";
 
 @Component
 export default class PanelLeft extends Vue {
+  searchFilters: Tag.Search[] = [];
+
+  mounted() {
+    this.restoreSearchFilters(this.$route);
+  }
+
   clear() {
-    this.$uiStore.searchFilters = [];
+    this.searchFilters = [];
     this.search();
   }
 
@@ -52,13 +59,23 @@ export default class PanelLeft extends Vue {
 
   serializeSearch() {
     let query: Dictionary<null> = {};
-    this.$uiStore.searchFilters.forEach(filter => (query[filter.display] = null));
+    this.searchFilters.forEach(filter => (query[filter.display] = null));
     return query;
   }
 
   currentTags() {
     return this.$galleryStore.currentItem?.tags ?? [];
   }
+
+  @Watch("$route")
+  restoreSearchFilters(route: Route) {
+    const query = Object.keys(route.query);
+    if (query.length > 0) {
+      const tagsIndex = this.$galleryStore.tagsIndex;
+      this.searchFilters = Object.keys(route.query).flatMap(filter => IndexFactory.searchTags(tagsIndex, filter));
+      this.$galleryStore.setCurrentSearch([...this.searchFilters]);
+    }
+  }
 }
 </script>
 
-- 
cgit v1.2.3


From f2ff937fe4a5782741886ef4920fd0e284775463 Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Thu, 27 Feb 2020 23:26:00 +0100
Subject: viewer: tag index bugfix

Search from the URL requires a strict match instead of a loose match
Category search was case sensitive
Category + disambiguation was matching like an intersection of both tags instead of being hard-coupled
Removed the logs for the release (coming soon)
---
 viewer/src/views/PanelLeft.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'viewer/src/views/PanelLeft.vue')

diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue
index 54b9c63..5b3196a 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -72,7 +72,7 @@ export default class PanelLeft extends Vue {
     const query = Object.keys(route.query);
     if (query.length > 0) {
       const tagsIndex = this.$galleryStore.tagsIndex;
-      this.searchFilters = Object.keys(route.query).flatMap(filter => IndexFactory.searchTags(tagsIndex, filter));
+      this.searchFilters = Object.keys(route.query).flatMap(filter => IndexFactory.searchTags(tagsIndex, filter, true));
       this.$galleryStore.setCurrentSearch([...this.searchFilters]);
     }
   }
-- 
cgit v1.2.3


From 7f0b8367a2092c5ffd69e9e46d055cbd605c0e3a Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Fri, 28 Feb 2020 18:50:12 +0100
Subject: viewer: more minor architectural and performance improvement

---
 viewer/src/views/PanelLeft.vue | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

(limited to 'viewer/src/views/PanelLeft.vue')

diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue
index 5b3196a..9e9a600 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -70,11 +70,7 @@ export default class PanelLeft extends Vue {
   @Watch("$route")
   restoreSearchFilters(route: Route) {
     const query = Object.keys(route.query);
-    if (query.length > 0) {
-      const tagsIndex = this.$galleryStore.tagsIndex;
-      this.searchFilters = Object.keys(route.query).flatMap(filter => IndexFactory.searchTags(tagsIndex, filter, true));
-      this.$galleryStore.setCurrentSearch([...this.searchFilters]);
-    }
+    if (query.length > 0) this.$galleryStore.search(query).then(search => (this.searchFilters = [...search]));
   }
 }
 </script>
-- 
cgit v1.2.3


From 332b208d3fdc91d29181c8f42ef5ff9b1fd1f09a Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Thu, 2 Apr 2020 18:45:20 +0200
Subject: viewer: press "enter" in the empty tagInput to trigger a search

revert: viewer: removing a tag from the filters opens the keyboard on mobile (fixed in Buefy)

GitHub: Resolves #168
---
 viewer/src/views/PanelLeft.vue | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'viewer/src/views/PanelLeft.vue')

diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue
index 9e9a600..1b3f90b 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -19,7 +19,11 @@
 
 <template>
   <div class="flex-column sidebar">
-    <ld-tag-input :search-filters.sync="searchFilters" :tags-index="$galleryStore.tagsIndex" />
+    <ld-tag-input
+      :search-filters.sync="searchFilters"
+      :tags-index="$galleryStore.tagsIndex"
+      @onkeyenter-empty="search"
+    />
     <ld-command-search @clear="clear" @search="search" />
     <h1 class="title">{{$t('panelLeft.propositions')}}</h1>
     <ld-proposition
-- 
cgit v1.2.3


From 577f49ab6e1fd9cd8007804a13dea1471ee2fb1f Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Fri, 3 Apr 2020 03:42:35 +0200
Subject: viewer: tag categories implementation

GitHub: Resolves #29
---
 viewer/src/views/PanelLeft.vue | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

(limited to 'viewer/src/views/PanelLeft.vue')

diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue
index 9e9a600..824d1ae 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -22,12 +22,17 @@
     <ld-tag-input :search-filters.sync="searchFilters" :tags-index="$galleryStore.tagsIndex" />
     <ld-command-search @clear="clear" @search="search" />
     <h1 class="title">{{$t('panelLeft.propositions')}}</h1>
-    <ld-proposition
-      :search-filters.sync="searchFilters"
-      :tags-index="$galleryStore.tagsIndex"
-      :current-tags="currentTags()"
-      class="scrollbar no-scroll-x"
-    />
+    <div v-dragscroll class="scrollbar no-scroll-x">
+      <ld-proposition
+        v-for="(category) in $galleryStore.tagsCategories"
+        :key="category.tag"
+        :title="category.tag"
+        :show-title="$galleryStore.tagsCategories.length > 1"
+        :search-filters.sync="searchFilters"
+        :tags-index="category.index"
+        :current-tags="currentTags()"
+      />
+    </div>
   </div>
 </template>
 
@@ -76,9 +81,14 @@ export default class PanelLeft extends Vue {
 </script>
 
 <style lang="scss">
+@import "@/assets/scss/theme.scss";
+
 .sidebar {
   .title {
-    margin: 0.2em 0.5em !important;
+    background-color: $proposed-category-bgcolor;
+    padding: 0.2em 0.5em;
+    margin: 0 0 1px 0;
+    font-variant: small-caps;
   }
 }
 </style>
-- 
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/views/PanelLeft.vue | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'viewer/src/views/PanelLeft.vue')

diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue
index 824d1ae..3fc62be 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -26,8 +26,8 @@
       <ld-proposition
         v-for="(category) in $galleryStore.tagsCategories"
         :key="category.tag"
-        :title="category.tag"
-        :show-title="$galleryStore.tagsCategories.length > 1"
+        :category="$galleryStore.tagsIndex[category.tag]"
+        :show-category="$galleryStore.tagsCategories.length > 1"
         :search-filters.sync="searchFilters"
         :tags-index="category.index"
         :current-tags="currentTags()"
-- 
cgit v1.2.3


From 36877c2e4cd1d1a920ca2b7a5ce14e01ee49b1f6 Mon Sep 17 00:00:00 2001
From: pacien
Date: Mon, 6 Apr 2020 20:26:19 +0200
Subject: viewer: fix touchpad scroll in filter proposition list

Dragscroll plays badly with touchpads and brings no benefit on desktop.
It is still supported on touchscreen devices natively in the presence of the
scrollbars.
---
 viewer/src/views/PanelLeft.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'viewer/src/views/PanelLeft.vue')

diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue
index 0fe0164..541b296 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -26,7 +26,7 @@
     />
     <ld-command-search @clear="clear" @search="search" />
     <h1 class="title">{{$t('panelLeft.propositions')}}</h1>
-    <div v-dragscroll class="scrollbar no-scroll-x">
+    <div class="scrollbar no-scroll-x">
       <ld-proposition
         v-for="(category) in $galleryStore.tagsCategories"
         :key="category.tag"
-- 
cgit v1.2.3


From 26988eacd2ff6988479b53eb88b5c2c10d3e7c82 Mon Sep 17 00:00:00 2001
From: pacien
Date: Sun, 26 Apr 2020 00:25:24 +0200
Subject: viewer: fix rest of webpack import

---
 viewer/src/views/PanelLeft.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'viewer/src/views/PanelLeft.vue')

diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue
index 541b296..e3821a8 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -85,7 +85,7 @@ export default class PanelLeft extends Vue {
 </script>
 
 <style lang="scss">
-@import "@/assets/scss/theme.scss";
+@import "~@/assets/scss/theme.scss";
 
 .sidebar {
   .title {
-- 
cgit v1.2.3

