feat: error handing: alert -> dialog

This commit is contained in:
opbnq-q
2025-03-09 04:38:45 -07:00
parent f648b4b171
commit d149aebf12
4 changed files with 40 additions and 5 deletions

View File

@@ -0,0 +1,23 @@
import { defineStore } from "pinia";
export interface ErrorState {
show: boolean
message: string
}
export const useErrorStore = defineStore("error", {
state: (): ErrorState => ({
show: false,
message: ""
}),
actions: {
summon(message: string) {
this.show = true
this.message = message
},
close() {
this.show = false
this.message = ""
}
}
})