移出player

This commit is contained in:
StarsEnd
2025-12-18 02:21:00 +08:00
parent d2465b5d4b
commit 0da82802b8
4 changed files with 37 additions and 39 deletions

View File

@@ -41,27 +41,27 @@ export const useGameStore = defineStore('game', {
giftRejectedNotifications: [],
points: 0,
isGMEnabled: false, // 明确设置 GM 模式默认为 false
lastVersionCheckTime: 0, // 最后一次检查版本的时间戳默认为0
notificationSettings: {
browser: false,
inApp: true,
suppressInFocus: false,
types: {
construction: true,
research: true
}
}
lastVersionCheckTime: 0 // 最后一次检查版本的时间戳默认为0
} as Player,
currentPlanetId: '',
isDark: '',
locale: 'zh-CN' as Locale
locale: 'zh-CN' as Locale,
notificationSettings: {
browser: false,
inApp: true,
suppressInFocus: false,
types: {
construction: true,
research: true
}
}
}),
actions: {
async requestBrowserPermission(): Promise<boolean> {
if (!('Notification' in window)) return false
if (Notification.permission === 'granted') return true
const permission = await Notification.requestPermission()
return permission === 'granted'
}