mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 20:43:04 +00:00
use computed properties to render correct nav title
This commit is contained in:
+18
-4
@@ -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;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user