From 6b6c1145ab8e4e6894eb54b1c98fb4b02e0d17b3 Mon Sep 17 00:00:00 2001
From: pacien
Date: Sat, 17 Oct 2020 20:54:18 +0200
Subject: viewer: set pointer cursor on collapsible info panel title bar

GitHub: closes #269
---
 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 0ab3aa8..d2a3656 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -37,7 +37,7 @@
         :current-tags="currentTags"
       />
     </div>
-    <h1 class="flex title" @click="infoOpen = !infoOpen">
+    <h1 :class="$style.infoPanelTitleBar" class="flex title" @click="infoOpen = !infoOpen">
       {{ $t("panelLeft.information.title") }}
       <fa-icon :icon="infoOpen ? 'caret-down' : 'caret-up'" />
     </h1>
@@ -108,6 +108,10 @@ export default class PanelLeft extends Vue {
       margin-top: 2px; // Fixes a vertical centering issue with the carret
     }
   }
+
+  .infoPanelTitleBar {
+    cursor: pointer;
+  }
 }
 
 .flexShrinkFully {
-- 
cgit v1.2.3


From 9165cc1efcf7791f78b61b2c51a9de651b1b09aa Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Fri, 2 Jul 2021 22:53:16 +0200
Subject: viewer: types normalization - gallery.d.ts

GitHub: closes #301
---
 viewer/src/views/PanelLeft.vue | 5 ++---
 1 file changed, 2 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 d2a3656..5c42fa9 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -48,10 +48,9 @@
 </template>
 
 <script lang="ts">
-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";
+import { Component, Vue, Watch } from "vue-property-decorator";
+import { Dictionary, Route } from "vue-router/types/router";
 
 @Component
 export default class PanelLeft extends Vue {
-- 
cgit v1.2.3


From 92cb34b719b481faf417760f307241e8f6d777a9 Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Fri, 2 Jul 2021 22:59:56 +0200
Subject: viewer: types normalization - tag.d.ts

GitHub: closes #301
---
 viewer/src/views/PanelLeft.vue | 3 ++-
 1 file changed, 2 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 5c42fa9..ea61865 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -48,13 +48,14 @@
 </template>
 
 <script lang="ts">
+import { TagSearch } from "@/@types/tag";
 import Navigation from "@/services/navigation";
 import { Component, Vue, Watch } from "vue-property-decorator";
 import { Dictionary, Route } from "vue-router/types/router";
 
 @Component
 export default class PanelLeft extends Vue {
-  searchFilters: Tag.Search[] = [];
+  searchFilters: TagSearch[] = [];
   infoOpen: boolean = true;
 
   mounted() {
-- 
cgit v1.2.3


From 00510820a2794efcadbc83f7f8b54318fe198ecb Mon Sep 17 00:00:00 2001
From: Zéro~Informatique
Date: Tue, 26 Jul 2022 08:44:34 +0200
Subject: viewer: migrate to vue 3, general refactoring and cleanup

Non-exhaustive list of fixes and improvements done at the same time:

- html default background to grey (avoids white flash during init)
- unified links behavior
- added more theme variables
- removed the flex-expand transition (it wasn't working) and replaced it
  with a slide
- fixed LdLoading not centered on the content
- title on removable tags
- fixed an issue with encoded URI from vue-router
- unified Item resource URLs
- removed the iframe for PlainTextViewer (it wasn't working properly)
  and replaced it with a pre
- fixed clear and search buttons tabindex
- fixed the information panel bumping up during the fade animation of
  tag's dropdown
- fixed some focus outlines not appearing correctly
- moved CSS variables to the :root context
- Code cleaning

GitHub: closes #217
GitHub: closes #300
GitHub: closes #297
GitHub: closes #105
GitHub: closes #267
GitHub: closes #275
GitHub: closes #228
GitHub: closes #215
GitHub: closes #112
---
 viewer/src/views/PanelLeft.vue | 120 -----------------------------------------
 1 file changed, 120 deletions(-)
 delete mode 100644 viewer/src/views/PanelLeft.vue

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

diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue
deleted file mode 100644
index ea61865..0000000
--- a/viewer/src/views/PanelLeft.vue
+++ /dev/null
@@ -1,120 +0,0 @@
-<!-- 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="flex-column" :class="$style.sidebar">
-    <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>
-    <div class="scrollbar no-scroll-x flex-grow-1" :class="$style.flexShrinkFully">
-      <ld-proposition
-        v-for="category in $galleryStore.tagsCategories"
-        :key="category.tag"
-        :category="$galleryStore.tagsIndex[category.tag]"
-        :show-category="$galleryStore.tagsCategories.length > 1"
-        :search-filters.sync="searchFilters"
-        :tags-index="category.index"
-        :current-tags="currentTags"
-      />
-    </div>
-    <h1 :class="$style.infoPanelTitleBar" class="flex title" @click="infoOpen = !infoOpen">
-      {{ $t("panelLeft.information.title") }}
-      <fa-icon :icon="infoOpen ? 'caret-down' : 'caret-up'" />
-    </h1>
-    <transition name="flex-expand">
-      <ld-information v-show="infoOpen" :item="$galleryStore.currentItem" class="scrollbar no-scroll-x" />
-    </transition>
-  </div>
-</template>
-
-<script lang="ts">
-import { TagSearch } from "@/@types/tag";
-import Navigation from "@/services/navigation";
-import { Component, Vue, Watch } from "vue-property-decorator";
-import { Dictionary, Route } from "vue-router/types/router";
-
-@Component
-export default class PanelLeft extends Vue {
-  searchFilters: TagSearch[] = [];
-  infoOpen: boolean = true;
-
-  mounted() {
-    this.restoreSearchFilters(this.$route);
-  }
-
-  clear() {
-    this.searchFilters = [];
-    this.search();
-  }
-
-  search() {
-    const lastDirectory = Navigation.getLastDirectory(this.$galleryStore.currentItemPath);
-    this.$router.push({ path: lastDirectory.path, query: this.serializeSearch() }).catch(err => {
-      if (err.name !== "NavigationDuplicated") throw err;
-    });
-  }
-
-  serializeSearch() {
-    let query: Dictionary<null> = {};
-    this.searchFilters.forEach(filter => (query[filter.display] = null));
-    return query;
-  }
-
-  get currentTags() {
-    return this.$galleryStore.currentItem?.tags ?? [];
-  }
-
-  @Watch("$route")
-  restoreSearchFilters(route: Route) {
-    const query = Object.keys(route.query);
-    if (query.length > 0) this.$galleryStore.search(query).then(search => (this.searchFilters = [...search]));
-  }
-}
-</script>
-
-<style lang="scss" module>
-@import "~@/assets/scss/theme.scss";
-
-.sidebar {
-  :global(.title) {
-    background-color: $proposed-category-bgcolor;
-    padding: 0.2em 0.5em;
-    margin: 0 0 1px 0;
-    font-variant: small-caps;
-    justify-content: space-between;
-    user-select: none;
-    > svg {
-      color: $link;
-      margin-top: 2px; // Fixes a vertical centering issue with the carret
-    }
-  }
-
-  .infoPanelTitleBar {
-    cursor: pointer;
-  }
-}
-
-.flexShrinkFully {
-  flex-shrink: 1000;
-}
-</style>
-- 
cgit v1.2.3

