chore: update frontend configuration
This commit is contained in:
@@ -3,7 +3,7 @@ import { ref } from 'vue'
|
||||
const toasts = ref([])
|
||||
let nextId = 1
|
||||
|
||||
export function useToast() {
|
||||
export function useToast () {
|
||||
const showToast = (message, type = 'info', duration = 5000) => {
|
||||
const id = nextId++
|
||||
const toast = {
|
||||
@@ -12,14 +12,14 @@ export function useToast() {
|
||||
type,
|
||||
visible: true
|
||||
}
|
||||
|
||||
|
||||
toasts.value.push(toast)
|
||||
|
||||
|
||||
// Auto-remove after duration
|
||||
setTimeout(() => {
|
||||
removeToast(id)
|
||||
}, duration)
|
||||
|
||||
|
||||
return id
|
||||
}
|
||||
|
||||
@@ -63,4 +63,4 @@ export function useToast() {
|
||||
removeToast,
|
||||
clearAll
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user