This commit is contained in:
marzban-dev
2025-06-01 22:15:54 +03:30
parent ad52a9746d
commit f4e4abc94c
+6 -6
View File
@@ -1,14 +1,14 @@
export type ToastOptions = {
description?: string;
duration?: number;
status?: "success" | "error" | "info" | "warning",
}
status?: "success" | "error" | "info" | "warning";
};
type Toast = {
id: number;
message: string;
options?: ToastOptions
}
options?: ToastOptions;
};
const toasts = ref<Toast[]>([]);
@@ -20,12 +20,12 @@ export function useToast() {
};
const destroyToast = (id: number) => {
toasts.value = toasts.value.filter(toast => toast.id !== id);
toasts.value = toasts.value.filter((toast) => toast.id !== id);
};
return {
toasts,
addToast,
destroyToast
destroyToast,
};
}