feat(settings): improve typing
This commit is contained in:
@@ -1,20 +1,18 @@
|
||||
type Menu = "options" | "clock" | "user" | "touchScreen";
|
||||
|
||||
export const useSettingsStore = defineStore("settings", {
|
||||
state: () => ({
|
||||
currentMenu: null as Menu | null,
|
||||
currentSubMenu: null as string | null,
|
||||
currentMenu: null as SettingsMenu | null,
|
||||
currentSubMenu: null as SettingsSubMenu | null,
|
||||
menuExpanded: false,
|
||||
}),
|
||||
|
||||
actions: {
|
||||
openMenu(menu: Menu, expanded: boolean = false) {
|
||||
openMenu(menu: SettingsMenu, expanded: boolean = false) {
|
||||
this.currentMenu = menu;
|
||||
this.menuExpanded = expanded;
|
||||
this.currentSubMenu = null;
|
||||
},
|
||||
|
||||
openSubMenu(submenu: string) {
|
||||
openSubMenu(submenu: SettingsSubMenu) {
|
||||
this.currentSubMenu = submenu;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user