From a681accaa7617892bb7c53248aa9030a4eb47f50 Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Sat, 28 Dec 2019 04:52:30 +0100
Subject: viewer: Tag propositions. Disabled directory indexation. Note: The
propositions are not based on the current search results, but on the searched
tags, which doesn't seem to be the correct way. We'll probably have to move
the search results to a store for global visibility.
---
viewer/src/@types/gallery/index.d.ts | 3 +-
viewer/src/@types/tag/index.d.ts | 2 +-
viewer/src/components/LdProposition.vue | 75 +++++++++++++++++++++++++++++++++
viewer/src/locales/en.json | 3 +-
viewer/src/plugins/fontawesome.ts | 6 ++-
viewer/src/store/galleryStore.ts | 6 ++-
viewer/src/views/PanelLeft.vue | 2 +
7 files changed, 91 insertions(+), 6 deletions(-)
create mode 100644 viewer/src/components/LdProposition.vue
diff --git a/viewer/src/@types/gallery/index.d.ts b/viewer/src/@types/gallery/index.d.ts
index b47c812..310c865 100644
--- a/viewer/src/@types/gallery/index.d.ts
+++ b/viewer/src/@types/gallery/index.d.ts
@@ -9,7 +9,7 @@ declare namespace Gallery {
title: string,
date: string,
description: string,
- tags: string[],
+ tags: RawTag[],
path: string,
thumbnail: {
path: string,
@@ -28,4 +28,5 @@ declare namespace Gallery {
type: "directory",
items: Item[]
}
+ type RawTag = string;
}
\ No newline at end of file
diff --git a/viewer/src/@types/tag/index.d.ts b/viewer/src/@types/tag/index.d.ts
index 6a0c605..181f47a 100644
--- a/viewer/src/@types/tag/index.d.ts
+++ b/viewer/src/@types/tag/index.d.ts
@@ -1,6 +1,6 @@
declare namespace Tag {
interface Node {
- tag: string;
+ tag: Gallery.RawTag;
items: Gallery.Item[];
children: Index;
}
diff --git a/viewer/src/components/LdProposition.vue b/viewer/src/components/LdProposition.vue
new file mode 100644
index 0000000..b23c14a
--- /dev/null
+++ b/viewer/src/components/LdProposition.vue
@@ -0,0 +1,75 @@
+
+