refactor: modularize frontend flows

This commit is contained in:
Lan
2026-06-03 02:01:57 +08:00
parent 9300607f96
commit a11e7900b4
85 changed files with 4654 additions and 4363 deletions
+3 -9
View File
@@ -53,7 +53,7 @@ const { t } = useI18n()
const alertStore = useAlertStore()
const { alerts } = storeToRefs(alertStore)
const { removeAlert, updateAlertProgress } = alertStore
const { removeAlert, startProgressTimer, stopProgressTimer } = alertStore
const gradientClasses = {
success: 'from-green-500 to-green-600',
@@ -69,18 +69,12 @@ const alertIcons = {
info: Info
}
let intervalId: ReturnType<typeof setInterval>
onMounted(() => {
intervalId = setInterval(() => {
alerts.value.forEach((alert) => {
updateAlertProgress(alert.id)
})
}, 100)
startProgressTimer()
})
onUnmounted(() => {
clearInterval(intervalId)
stopProgressTimer()
})
</script>