Adjusted login validation
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user