From 252dd6fc6f53ecd8b28e05a0514429472d53d08e Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Fri, 31 Jan 2020 06:46:31 +0100 Subject: viewer: finalized the command buttons. added the 'up to parent' command --- viewer/src/store/uiStore.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'viewer/src/store/uiStore.ts') diff --git a/viewer/src/store/uiStore.ts b/viewer/src/store/uiStore.ts index 6bcc538..f7484de 100644 --- a/viewer/src/store/uiStore.ts +++ b/viewer/src/store/uiStore.ts @@ -27,6 +27,7 @@ const VuexModule = createModule({ export default class UIStore extends VuexModule { fullscreen: boolean = false; + fullWidth: boolean = true; mode: "navigation" | "search" = "navigation"; currentTags: Tag.Search[] = []; @@ -46,6 +47,10 @@ export default class UIStore extends VuexModule { this.fullscreen = !this.fullscreen; } + @mutation toggleFullWidth() { + this.fullWidth = !this.fullWidth; + } + @mutation setModeNavigation() { this.mode = "navigation"; } -- cgit v1.2.3 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/store/uiStore.ts | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'viewer/src/store/uiStore.ts') diff --git a/viewer/src/store/uiStore.ts b/viewer/src/store/uiStore.ts index f7484de..5b6e1ca 100644 --- a/viewer/src/store/uiStore.ts +++ b/viewer/src/store/uiStore.ts @@ -28,18 +28,8 @@ export default class UIStore extends VuexModule { fullscreen: boolean = false; fullWidth: boolean = true; - mode: "navigation" | "search" = "navigation"; - currentTags: Tag.Search[] = []; - - // --- - - get isModeSearch() { - return this.mode === "search"; - } - - get isModeNavigation() { - return this.mode === "navigation"; - } + searchMode: boolean = false; + searchFilters: Tag.Search[] = []; // --- @@ -50,12 +40,4 @@ export default class UIStore extends VuexModule { @mutation toggleFullWidth() { this.fullWidth = !this.fullWidth; } - - @mutation setModeNavigation() { - this.mode = "navigation"; - } - - @mutation setModeSearch() { - this.mode = "search"; - } } -- 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/store/uiStore.ts | 1 - 1 file changed, 1 deletion(-) (limited to 'viewer/src/store/uiStore.ts') diff --git a/viewer/src/store/uiStore.ts b/viewer/src/store/uiStore.ts index 5b6e1ca..1e63b3e 100644 --- a/viewer/src/store/uiStore.ts +++ b/viewer/src/store/uiStore.ts @@ -29,7 +29,6 @@ export default class UIStore extends VuexModule { fullscreen: boolean = false; fullWidth: boolean = true; searchMode: boolean = false; - searchFilters: Tag.Search[] = []; // --- -- cgit v1.2.3 From 5672ee664abece41adeb59a8b2863d58d1b9b380 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Fri, 28 Feb 2020 04:05:02 +0100 Subject: viewer: show/hide the left panel depending on the viewport's width at init GitHub: Resolves #103 --- 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 1e63b3e..1d0d62f 100644 --- a/viewer/src/store/uiStore.ts +++ b/viewer/src/store/uiStore.ts @@ -27,7 +27,7 @@ const VuexModule = createModule({ export default class UIStore extends VuexModule { fullscreen: boolean = false; - fullWidth: boolean = true; + fullWidth: boolean = window.innerWidth < Number(process.env.VUE_APP_FULLWIDTH_LIMIT); searchMode: boolean = false; // --- -- cgit v1.2.3 From 8d889762872501eebd5edb5d7cacddfd4cd55ad4 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Fri, 28 Feb 2020 04:09:40 +0100 Subject: viewer: more minor architectural improvement --- viewer/src/store/uiStore.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'viewer/src/store/uiStore.ts') diff --git a/viewer/src/store/uiStore.ts b/viewer/src/store/uiStore.ts index 1e63b3e..21f9ce9 100644 --- a/viewer/src/store/uiStore.ts +++ b/viewer/src/store/uiStore.ts @@ -21,7 +21,7 @@ import { createModule, mutation, action } from "vuex-class-component"; const VuexModule = createModule({ namespaced: "uiStore", - strict: false + strict: true }) export default class UIStore extends VuexModule { @@ -32,11 +32,15 @@ export default class UIStore extends VuexModule { // --- - @mutation toggleFullscreen() { - this.fullscreen = !this.fullscreen; + @mutation toggleFullscreen(value?: boolean) { + this.fullscreen = value ?? !this.fullscreen; } - @mutation toggleFullWidth() { - this.fullWidth = !this.fullWidth; + @mutation toggleFullWidth(value?: boolean) { + this.fullWidth = value ?? !this.fullWidth; + } + + @mutation toggleSearchMode(value?: boolean) { + this.searchMode = value ?? !this.searchMode; } } -- cgit v1.2.3 From ccecfd9421f4550a71134cd46e1388e486f8c564 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Tue, 28 Apr 2020 03:47:39 +0200 Subject: viewer: global formatting unification --- viewer/src/store/uiStore.ts | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'viewer/src/store/uiStore.ts') diff --git a/viewer/src/store/uiStore.ts b/viewer/src/store/uiStore.ts index 2bd315c..892d35e 100644 --- a/viewer/src/store/uiStore.ts +++ b/viewer/src/store/uiStore.ts @@ -20,27 +20,27 @@ import { createModule, mutation, action } from "vuex-class-component"; const VuexModule = createModule({ - namespaced: "uiStore", - strict: true + namespaced: "uiStore", + strict: true }) export default class UIStore extends VuexModule { - fullscreen: boolean = false; - fullWidth: boolean = window.innerWidth < Number(process.env.VUE_APP_FULLWIDTH_LIMIT); - searchMode: boolean = false; + fullscreen: boolean = false; + fullWidth: boolean = window.innerWidth < Number(process.env.VUE_APP_FULLWIDTH_LIMIT); + searchMode: boolean = false; - // --- + // --- - @mutation toggleFullscreen(value?: boolean) { - this.fullscreen = value ?? !this.fullscreen; - } + @mutation toggleFullscreen(value?: boolean) { + this.fullscreen = value ?? !this.fullscreen; + } - @mutation toggleFullWidth(value?: boolean) { - this.fullWidth = value ?? !this.fullWidth; - } + @mutation toggleFullWidth(value?: boolean) { + this.fullWidth = value ?? !this.fullWidth; + } - @mutation toggleSearchMode(value?: boolean) { - this.searchMode = value ?? !this.searchMode; - } + @mutation toggleSearchMode(value?: boolean) { + this.searchMode = value ?? !this.searchMode; + } } -- cgit v1.2.3