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

(limited to 'viewer/src/components/LdGallery.vue')

diff --git a/viewer/src/components/LdGallery.vue b/viewer/src/components/LdGallery.vue
new file mode 100644
index 0000000..169bc54
--- /dev/null
+++ b/viewer/src/components/LdGallery.vue
@@ -0,0 +1,47 @@
+<!-- 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 class="thumbnail-tiles">
+    <div v-for="item in items" :key="item.path">
+      <router-link :to="item.path">
+        <ld-thumbnail :item="item" />
+      </router-link>
+    </div>
+    <div v-if="hasNoResults()">{{noresult}}</div>
+  </div>
+</template>
+
+<script lang="ts">
+import { Component, Vue, Prop, Model } from "vue-property-decorator";
+import DragScrollClickFix from "@/services/dragscrollclickfix";
+
+@Component
+export default class LdPicture extends Vue {
+  @Prop({ type: Array, required: true }) readonly items!: Gallery.Item[];
+  @Prop(String) readonly noresult?: string;
+
+  hasNoResults(): boolean {
+    return Boolean(this.noresult) && this.items.length === 0;
+  }
+}
+</script>
+
+<style lang="scss">
+</style>
-- 
cgit v1.2.3


From 4641f35baebd618ec51fa549adf64670c31c647f Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Thu, 27 Feb 2020 17:42:24 +0100
Subject: viewer: added a count of results found in other folders when
 no-results are found

---
 viewer/src/components/LdGallery.vue | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'viewer/src/components/LdGallery.vue')

diff --git a/viewer/src/components/LdGallery.vue b/viewer/src/components/LdGallery.vue
index 169bc54..16e9f7c 100644
--- a/viewer/src/components/LdGallery.vue
+++ b/viewer/src/components/LdGallery.vue
@@ -24,7 +24,7 @@
         <ld-thumbnail :item="item" />
       </router-link>
     </div>
-    <div v-if="hasNoResults()">{{noresult}}</div>
+    <div v-if="hasNoResults()" class="noresult">{{noresult}}</div>
   </div>
 </template>
 
@@ -44,4 +44,7 @@ export default class LdPicture extends Vue {
 </script>
 
 <style lang="scss">
+.thumbnail-tiles .noresult {
+  margin-top: 40px;
+}
 </style>
-- 
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/components/LdGallery.vue | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

(limited to 'viewer/src/components/LdGallery.vue')

diff --git a/viewer/src/components/LdGallery.vue b/viewer/src/components/LdGallery.vue
index 16e9f7c..cd4bc28 100644
--- a/viewer/src/components/LdGallery.vue
+++ b/viewer/src/components/LdGallery.vue
@@ -19,11 +19,9 @@
 
 <template>
   <div class="thumbnail-tiles">
-    <div v-for="item in items" :key="item.path">
-      <router-link :to="item.path">
-        <ld-thumbnail :item="item" />
-      </router-link>
-    </div>
+    <router-link v-for="item in items" :key="item.path" :to="item.path">
+      <ld-thumbnail :item="item" />
+    </router-link>
     <div v-if="hasNoResults()" class="noresult">{{noresult}}</div>
   </div>
 </template>
-- 
cgit v1.2.3


From 53bbb2b65e405aa93f1689faabce9cfa019e6d8f Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Mon, 27 Apr 2020 15:41:51 +0200
Subject: viewer: moved the global thumbnail CSS class to its component

---
 viewer/src/components/LdGallery.vue | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

(limited to 'viewer/src/components/LdGallery.vue')

diff --git a/viewer/src/components/LdGallery.vue b/viewer/src/components/LdGallery.vue
index cd4bc28..29c18b9 100644
--- a/viewer/src/components/LdGallery.vue
+++ b/viewer/src/components/LdGallery.vue
@@ -42,7 +42,16 @@ export default class LdPicture extends Vue {
 </script>
 
 <style lang="scss">
-.thumbnail-tiles .noresult {
-  margin-top: 40px;
+.thumbnail-tiles {
+  display: flex;
+  flex-wrap: wrap;
+  align-items: center;
+  justify-content: space-evenly;
+  & > a {
+    margin: 2px;
+  }
+  & .noresult {
+    margin-top: 40px;
+  }
 }
 </style>
-- 
cgit v1.2.3

