Fix toast dismiss, add delete confirms, and polish dashboard CTAs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-05 14:07:42 +02:00
co-authored by Cursor
parent d97bcea99e
commit 4411443fba
6 changed files with 89 additions and 19 deletions
+6 -3
View File
@@ -1,4 +1,4 @@
import { reactive } from 'vue'
import { reactive, toRef } from 'vue'
export type ToastTone = 'success' | 'error' | 'info' | 'warning'
@@ -19,12 +19,15 @@ function push(message: string, tone: ToastTone) {
}
function dismiss(id: string) {
state.items = state.items.filter((item) => item.id !== id)
const index = state.items.findIndex((item) => item.id === id)
if (index !== -1) {
state.items.splice(index, 1)
}
}
export function useToast() {
return {
toasts: state.items,
toasts: toRef(state, 'items'),
dismiss,
success: (message: string) => push(message, 'success'),
error: (message: string) => push(message, 'error'),