Minor improvement

This commit is contained in:
2024-09-29 16:07:55 +02:00
parent df3b9db45d
commit 1f46b94441
3 changed files with 57 additions and 51 deletions

View File

@ -5,23 +5,25 @@ import config from '@/config'
import { useCookies } from '@vueuse/integrations/useCookies'
export const useGameStore = defineStore('game', {
state: () => ({
notifications: [] as Notification[],
assets: [] as Asset[],
token: '' as string | null,
connection: null as Socket | null,
user: null as User | null,
character: null as Character | null,
isPlayerDraggingCamera: false,
gameSettings: {
isCameraFollowingCharacter: false
},
uiSettings: {
isChatOpen: false,
isUserPanelOpen: false,
isGmPanelOpen: false
state: () => {
return {
notifications: [] as Notification[],
assets: [] as Asset[],
token: '' as string | null,
connection: null as Socket | null,
user: null as User | null,
character: null as Character | null,
isPlayerDraggingCamera: false,
gameSettings: {
isCameraFollowingCharacter: false
},
uiSettings: {
isChatOpen: false,
isUserPanelOpen: false,
isGmPanelOpen: false
}
}
}),
},
getters: {
getNotifications: (state: any) => state.notifications,
getAssetByKey: (state) => {