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/GalleryNavigation.vue | 63 ++++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)
 create mode 100644 viewer/src/views/GalleryNavigation.vue

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

diff --git a/viewer/src/views/GalleryNavigation.vue b/viewer/src/views/GalleryNavigation.vue
new file mode 100644
index 0000000..e09b292
--- /dev/null
+++ b/viewer/src/views/GalleryNavigation.vue
@@ -0,0 +1,63 @@
+<!-- ldgallery - A static generator which turns a collection of tagged
+--             pictures into a searchable web gallery.
+--
+-- Copyright (C) 2019-2020  Guillaume FOUET
+--
+-- This program is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU Affero General Public License as
+-- published by the Free Software Foundation, either version 3 of the
+-- License, or (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-- GNU Affero General Public License for more details.
+--
+-- You should have received a copy of the GNU Affero General Public License
+-- along with this program.  If not, see <https://www.gnu.org/licenses/>.
+-->
+
+<template>
+  <div>
+    <gallery-search v-if="query.length" :path="path" :query="query" />
+    <gallery-directory v-else-if="checkType('directory')" :directory="$galleryStore.currentItem" />
+    <ld-picture v-else-if="checkType('picture')" :picture="$galleryStore.currentItem" />
+    <div v-else>{{$t("gallery.unknowntype")}}</div>
+  </div>
+</template>
+
+<script lang="ts">
+import { Component, Vue, Prop, Watch } from "vue-property-decorator";
+import { Operation } from "@/@types/Operation";
+import Navigation from "@/services/navigation";
+import GalleryDirectory from "./GalleryDirectory.vue";
+import GallerySearch from "@/views/GallerySearch.vue";
+
+@Component({
+  components: {
+    GalleryDirectory,
+    GallerySearch,
+  },
+})
+export default class GalleryNavigation extends Vue {
+  @Prop(String) readonly path!: string;
+  @Prop(Array) readonly query!: string[];
+
+  mounted() {
+    this.pathChanged();
+  }
+
+  @Watch("path")
+  pathChanged() {
+    console.log("Path: ", this.path);
+    this.$galleryStore.setCurrentPath(this.path);
+  }
+
+  private checkType(type: Gallery.ItemType): boolean {
+    return Navigation.checkType(this.$galleryStore.currentItem, type);
+  }
+}
+</script>
+
+<style lang="scss">
+</style>
-- 
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/GalleryNavigation.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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

diff --git a/viewer/src/views/GalleryNavigation.vue b/viewer/src/views/GalleryNavigation.vue
index e09b292..fafb2ed 100644
--- a/viewer/src/views/GalleryNavigation.vue
+++ b/viewer/src/views/GalleryNavigation.vue
@@ -19,7 +19,7 @@
 
 <template>
   <div>
-    <gallery-search v-if="query.length" :path="path" :query="query" />
+    <gallery-search v-if="query.length" :path="path" />
     <gallery-directory v-else-if="checkType('directory')" :directory="$galleryStore.currentItem" />
     <ld-picture v-else-if="checkType('picture')" :picture="$galleryStore.currentItem" />
     <div v-else>{{$t("gallery.unknowntype")}}</div>
-- 
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/GalleryNavigation.vue | 1 -
 1 file changed, 1 deletion(-)

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

diff --git a/viewer/src/views/GalleryNavigation.vue b/viewer/src/views/GalleryNavigation.vue
index fafb2ed..7c6d11b 100644
--- a/viewer/src/views/GalleryNavigation.vue
+++ b/viewer/src/views/GalleryNavigation.vue
@@ -49,7 +49,6 @@ export default class GalleryNavigation extends Vue {
 
   @Watch("path")
   pathChanged() {
-    console.log("Path: ", this.path);
     this.$galleryStore.setCurrentPath(this.path);
   }
 
-- 
cgit v1.2.3

