refactor : simplification globale (vague 1 + 2) + fix visibilité ActorProfileResolver #2
@@ -33,7 +33,7 @@ export function useToast() {
|
|||||||
message,
|
message,
|
||||||
type,
|
type,
|
||||||
visible: true,
|
visible: true,
|
||||||
duration: type === 'error' ? 0 : duration,
|
duration,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (toasts.value.length >= MAX_TOASTS) {
|
if (toasts.value.length >= MAX_TOASTS) {
|
||||||
@@ -42,8 +42,7 @@ export function useToast() {
|
|||||||
|
|
||||||
toasts.value.push(toast)
|
toasts.value.push(toast)
|
||||||
|
|
||||||
// Only auto-dismiss non-error toasts
|
if (duration > 0) {
|
||||||
if (type !== 'error' && duration > 0) {
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
removeToast(id)
|
removeToast(id)
|
||||||
}, duration)
|
}, duration)
|
||||||
@@ -56,8 +55,8 @@ export function useToast() {
|
|||||||
return showToast(message, 'success', duration)
|
return showToast(message, 'success', duration)
|
||||||
}
|
}
|
||||||
|
|
||||||
const showError = (message: string): number => {
|
const showError = (message: string, duration = 8000): number => {
|
||||||
return showToast(message, 'error', 0)
|
return showToast(message, 'error', duration)
|
||||||
}
|
}
|
||||||
|
|
||||||
const showWarning = (message: string, duration = 6000): number => {
|
const showWarning = (message: string, duration = 6000): number => {
|
||||||
|
|||||||
Reference in New Issue
Block a user