From 62005141132da1e9761598fa3e4b35b4dab38a89 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Sat, 21 Dec 2019 02:06:02 +0100 Subject: Implemented VueX and a basic UIStore with the fullscreen mutation Some renaming --- viewer/src/store/uiStore.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 viewer/src/store/uiStore.ts (limited to 'viewer/src/store/uiStore.ts') diff --git a/viewer/src/store/uiStore.ts b/viewer/src/store/uiStore.ts new file mode 100644 index 0000000..c4143a1 --- /dev/null +++ b/viewer/src/store/uiStore.ts @@ -0,0 +1,15 @@ +import { createModule, mutation, action } from "vuex-class-component"; + +const VuexModule = createModule({ + namespaced: "uiStore", + strict: true +}) + +export default class UIStore extends VuexModule { + + fullscreen: boolean = false; + + @mutation toggleFullscreen() { + this.fullscreen = !this.fullscreen; + } +} -- cgit v1.2.3 From e34be1261d9219e5b2b92ebe271f609f11d55f63 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Sun, 22 Dec 2019 03:50:40 +0100 Subject: vewer: Tags indexing and search input --- viewer/src/store/uiStore.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'viewer/src/store/uiStore.ts') diff --git a/viewer/src/store/uiStore.ts b/viewer/src/store/uiStore.ts index c4143a1..e04b507 100644 --- a/viewer/src/store/uiStore.ts +++ b/viewer/src/store/uiStore.ts @@ -2,12 +2,15 @@ import { createModule, mutation, action } from "vuex-class-component"; const VuexModule = createModule({ namespaced: "uiStore", - strict: true + strict: false }) export default class UIStore extends VuexModule { fullscreen: boolean = false; + currentTags: Tag.Node[] = []; + + // --- @mutation toggleFullscreen() { this.fullscreen = !this.fullscreen; -- cgit v1.2.3 From dc251fffc2998f1cf4f8e9631928c4b92ac0d90e Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Sun, 22 Dec 2019 07:40:55 +0100 Subject: viewer: Implemented the search by tags. Pushed the special urls to ENV. --- viewer/src/store/uiStore.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'viewer/src/store/uiStore.ts') diff --git a/viewer/src/store/uiStore.ts b/viewer/src/store/uiStore.ts index e04b507..4a6f487 100644 --- a/viewer/src/store/uiStore.ts +++ b/viewer/src/store/uiStore.ts @@ -8,11 +8,30 @@ const VuexModule = createModule({ export default class UIStore extends VuexModule { fullscreen: boolean = false; + mode: "navigation" | "search" = "navigation"; currentTags: Tag.Node[] = []; // --- + get isModeSearch() { + return this.mode === "search"; + } + + get isModeNavigation() { + return this.mode === "navigation"; + } + + // --- + @mutation toggleFullscreen() { this.fullscreen = !this.fullscreen; } + + @mutation setModeNavigation() { + this.mode = "navigation"; + } + + @mutation setModeSearch() { + this.mode = "search"; + } } -- cgit v1.2.3 From 7c2576b0cfb0a15b2a14f6f5ea96de16f0c23b44 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Tue, 24 Dec 2019 02:22:56 +0100 Subject: viewer: Plugin for Optional chaining and Coalesce. Implemented tag operations (intersection, addition, substraction). Unified Tag.Search --- viewer/src/store/uiStore.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'viewer/src/store/uiStore.ts') diff --git a/viewer/src/store/uiStore.ts b/viewer/src/store/uiStore.ts index 4a6f487..25d2a28 100644 --- a/viewer/src/store/uiStore.ts +++ b/viewer/src/store/uiStore.ts @@ -9,7 +9,7 @@ export default class UIStore extends VuexModule { fullscreen: boolean = false; mode: "navigation" | "search" = "navigation"; - currentTags: Tag.Node[] = []; + currentTags: Tag.Search[] = []; // --- -- cgit v1.2.3 From 27b51018525dbb7a6edb3073819d82245387ddd3 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Fri, 10 Jan 2020 22:22:22 +0100 Subject: viewer: license headers --- viewer/src/store/uiStore.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'viewer/src/store/uiStore.ts') diff --git a/viewer/src/store/uiStore.ts b/viewer/src/store/uiStore.ts index 25d2a28..6bcc538 100644 --- a/viewer/src/store/uiStore.ts +++ b/viewer/src/store/uiStore.ts @@ -1,3 +1,22 @@ +/* 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 . +*/ + import { createModule, mutation, action } from "vuex-class-component"; const VuexModule = createModule({ -- cgit v1.2.3