VueRouter, Pinia state management, add pages, design preferences page
This commit is contained in:
9
software/src/data/enums/themeEnums.ts
Normal file
9
software/src/data/enums/themeEnums.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export enum ThemeEnum {
|
||||
DARKRED = "darkRed",
|
||||
LIGHTRED = "lightRed",
|
||||
DARKBLUE = "darkBlue",
|
||||
LIGHTBLUE = "lightBlue",
|
||||
DARKGREEN = "darkGreen",
|
||||
LIGHTGREEN = "lightGreen"
|
||||
|
||||
}
|
||||
6
software/src/data/models/bannerModel.ts
Normal file
6
software/src/data/models/bannerModel.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export default class BannerModel {
|
||||
message: string = "Success!"
|
||||
show: boolean = false
|
||||
color: string = "green"
|
||||
icon: string = "mdi-check"
|
||||
}
|
||||
9
software/src/data/stores/userStore.ts
Normal file
9
software/src/data/stores/userStore.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { useLocalStorage } from "@vueuse/core";
|
||||
import { ThemeEnum } from "../enums/themeEnums";
|
||||
|
||||
export const useUserStore = defineStore('user', {
|
||||
state: () => ({
|
||||
theme: useLocalStorage<ThemeEnum>("hackmycart/userStore/theme", ThemeEnum.DARKRED)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user