Refactor frontend to route-based navigation with vue-router, add system setup and login pages with API integration. Add structured logging, access-log middleware and startup lifecycle to FastAPI backend.
16 lines
265 B
JavaScript
16 lines
265 B
JavaScript
import { ref } from 'vue'
|
|
|
|
const toastText = ref('')
|
|
|
|
function toast(text) {
|
|
toastText.value = text
|
|
clearTimeout(toast.timer)
|
|
toast.timer = setTimeout(() => {
|
|
toastText.value = ''
|
|
}, 3200)
|
|
}
|
|
|
|
export function useToast() {
|
|
return { toastText, toast }
|
|
}
|