kin: auto-commit after pipeline
This commit is contained in:
parent
76a88714e4
commit
4bc421e117
5 changed files with 195 additions and 6 deletions
|
|
@ -46,8 +46,10 @@ function loadDismissedWatchdog(): Set<string> {
|
|||
}
|
||||
}
|
||||
|
||||
const WATCHDOG_MAX_STORED = 100
|
||||
|
||||
function saveDismissedWatchdog(ids: Set<string>) {
|
||||
localStorage.setItem(WATCHDOG_TOAST_KEY, JSON.stringify([...ids]))
|
||||
localStorage.setItem(WATCHDOG_TOAST_KEY, JSON.stringify([...ids].slice(-WATCHDOG_MAX_STORED)))
|
||||
}
|
||||
|
||||
const dismissedWatchdog = ref<Set<string>>(loadDismissedWatchdog())
|
||||
|
|
@ -117,6 +119,10 @@ onMounted(async () => {
|
|||
|
||||
onUnmounted(() => {
|
||||
if (pollTimer) clearInterval(pollTimer)
|
||||
// KIN-099: clear watchdog toast auto-dismiss timers to prevent memory leaks
|
||||
for (const toast of watchdogToasts.value) {
|
||||
if (toast.timerId) clearTimeout(toast.timerId)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue