self destroying notifications, working on validating login form

This commit is contained in:
Sockenklaus
2021-10-24 21:43:10 +02:00
parent 08b31860b3
commit bc56f65abd
3 changed files with 28 additions and 6 deletions

View File

@@ -15,13 +15,15 @@ export const useNotifications = defineStore('notifications', {
},
add(type : string, text: string) : void {
const id = uuidv4()
this.notifications.set(
uuidv4(),
id,
{
type:type,
text:text,
}
)
setTimeout(() => this.remove(id), 1500)
}
}
})