refactor: relocate constants in screen stores
This commit is contained in:
@@ -1,25 +1,32 @@
|
||||
export type SettingsButton =
|
||||
| "options"
|
||||
| "optionsLanguage"
|
||||
| "options2048"
|
||||
| "optionsStartUp"
|
||||
| "clock"
|
||||
| "clockAchievements"
|
||||
| "clockTime"
|
||||
| "clockDate"
|
||||
| "user"
|
||||
| "userBirthday"
|
||||
| "userUserName"
|
||||
| "userSnake"
|
||||
| "userColor"
|
||||
| "touchScreen";
|
||||
export const SETTINGS_MENUS = [
|
||||
"options",
|
||||
"clock",
|
||||
"user",
|
||||
"touchScreen",
|
||||
] as const;
|
||||
|
||||
export const SETTINGS_SUB_MENUS = [
|
||||
"optionsLanguage",
|
||||
"options2048",
|
||||
"optionsStartUp",
|
||||
"clockAchievements",
|
||||
"clockTime",
|
||||
"clockDate",
|
||||
"userBirthday",
|
||||
"userUserName",
|
||||
"userSnake",
|
||||
"userColor",
|
||||
] as const;
|
||||
|
||||
export type SettingsMenu = (typeof SETTINGS_MENUS)[number];
|
||||
export type SettingsSubMenu = (typeof SETTINGS_SUB_MENUS)[number];
|
||||
|
||||
export const useSettingsStore = defineStore("settings", {
|
||||
state: () => ({
|
||||
currentMenu: null as SettingsMenu | null,
|
||||
currentSubMenu: null as SettingsSubMenu | null,
|
||||
menuExpanded: false,
|
||||
selectedButton: "options" as SettingsButton,
|
||||
selectedButton: "options" as SettingsMenu | SettingsSubMenu,
|
||||
}),
|
||||
|
||||
actions: {
|
||||
|
||||
Reference in New Issue
Block a user