2022-04-22 01:16:02 +08:00
|
|
|
import { defineStore } from "pinia"
|
|
|
|
import layoutSettings from "@/config/layout"
|
2022-04-21 18:20:39 +08:00
|
|
|
|
|
|
|
interface ISettingsState {
|
|
|
|
fixedHeader: boolean
|
|
|
|
showSettings: boolean
|
|
|
|
showTagsView: boolean
|
|
|
|
showSidebarLogo: boolean
|
|
|
|
showThemeSwitch: boolean
|
|
|
|
showScreenfull: boolean
|
|
|
|
}
|
|
|
|
|
|
|
|
export const useSettingsStore = defineStore({
|
2022-04-22 01:16:02 +08:00
|
|
|
id: "settings",
|
2022-04-21 18:20:39 +08:00
|
|
|
state: (): ISettingsState => {
|
|
|
|
return {
|
|
|
|
fixedHeader: layoutSettings.fixedHeader,
|
|
|
|
showSettings: layoutSettings.showSettings,
|
|
|
|
showTagsView: layoutSettings.showTagsView,
|
|
|
|
showSidebarLogo: layoutSettings.showSidebarLogo,
|
|
|
|
showThemeSwitch: layoutSettings.showThemeSwitch,
|
|
|
|
showScreenfull: layoutSettings.showScreenfull
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|