forget and recover password functionalities

This commit is contained in:
Edd
2026-01-18 01:37:27 +00:00
parent 0fe0b444c2
commit 9c0dca8f13
11 changed files with 333 additions and 145 deletions
+22
View File
@@ -0,0 +1,22 @@
import { defineStore } from 'pinia'
export const useNotificationStore = defineStore('notifications', {
state: () => ({
notifications: []
}),
actions: {
add(message, type = 'success', duration = 3000) {
const id = Date.now()
this.notifications.push({ id, message, type })
setTimeout(() => {
this.remove(id)
}, duration)
},
remove(id) {
this.notifications = this.notifications.filter(n => n.id !== id)
},
error(msg) { this.add(msg, 'error') },
success(msg) { this.add(msg, 'success') }
}
})