kun-galgame-vue/src/store/modules/settings.ts

29 lines
732 B
TypeScript
Raw Normal View History

2023-05-12 18:23:22 +00:00
// KUNGalgame 设置面板的 store
import { defineStore } from 'pinia'
2023-05-26 09:07:35 +00:00
// 设置面板配置
interface KUNGalgameSettings {
// 是否显示设置面板
showKUNGalgamePanel: boolean
// 网站显示语言
showKUNGalgameLanguage: string
2023-05-26 09:07:35 +00:00
// 主页宽度
showKUNGalgameMainPageWidth: string
2023-05-27 02:39:57 +00:00
// 背景图
showKUNGalgameBackground: string
2023-05-30 14:06:30 +00:00
// 自定义背景图
showCustomBackground: string
2023-05-26 09:07:35 +00:00
}
export const useKUNGalgameSettingsStore = defineStore({
id: 'KUNGalgame-settings',
persist: true,
state: (): KUNGalgameSettings => ({
showKUNGalgamePanel: false,
showKUNGalgameLanguage: 'en',
showKUNGalgameMainPageWidth: '61.8',
showKUNGalgameBackground: 'none',
2023-05-30 14:06:30 +00:00
showCustomBackground: '',
}),
2023-05-12 18:23:22 +00:00
})