Adjusted login validation

This commit is contained in:
2024-10-04 22:31:16 +02:00
parent 8c3a488e7d
commit 15442764c2
2 changed files with 38 additions and 18 deletions

View File

@ -7,6 +7,7 @@ import { useCookies } from '@vueuse/integrations/useCookies'
export const useGameStore = defineStore('game', {
state: () => {
return {
loginMessage: null as string | null,
notifications: [] as Notification[],
assets: [] as Asset[],
token: '' as string | null,
@ -31,6 +32,9 @@ export const useGameStore = defineStore('game', {
}
},
actions: {
setLoginMessage(message: string | null) {
this.loginMessage = message
},
addNotification(notification: Notification) {
if (!notification.id) {
notification.id = Math.random().toString(16)