use computed properties to render correct nav title

This commit is contained in:
geoffrey45
2022-06-10 10:01:12 +03:00
parent a14f35b0e5
commit 857c2484fe
8 changed files with 131 additions and 75 deletions
+18 -4
View File
@@ -1,12 +1,26 @@
import { playSources } from "@/composables/enums";
import { defineStore } from "pinia";
export default defineStore("navmanagement", {
export default defineStore("navstore", {
state: () => ({
showPlay: false,
/**
* Page header visibility status.
*/
h_visible: false,
title: {
text: "",
store: null,
source: playSources,
},
}),
actions: {
toggleShowPlay(state: boolean) {
this.showPlay = state;
/**
* Toggles the store value of the page header visibility.
*
* @param {boolean} state The visibility state of the page header.
*/
toggleShowPlay(state: boolean): void {
this.h_visible = state;
},
},
});