diff --git a/pages/index.vue b/pages/index.vue index 221ffe0..e155de7 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -220,6 +220,8 @@ const fetchSettings = async () => { } } +let intervalId: NodeJS.Timeout; + onMounted(async () => { let isAuthed = await checkAuth(useRouter()) if(isAuthed){ @@ -231,15 +233,19 @@ onMounted(async () => { await fetchMemoryInfo() await fetchNetworkInfo() if(settings.enable_services) await fetchServiceInfo() - const intervalId = setInterval(fetchCpuTemp, 7000); - onUnmounted(() => { - clearInterval(intervalId); - }); + intervalId = setInterval(fetchCpuTemp, 7000); + } }) +onBeforeUnmount(()=>{ + clearInterval(intervalId); +}) + + + diff --git a/panel.config.ts b/panel.config.ts index e0b5ecc..1f71c42 100644 --- a/panel.config.ts +++ b/panel.config.ts @@ -24,5 +24,5 @@ export const settings = reactive({ "libvirt", "frp" ], - password_hash: "" + password_hash: "$2b$10$cdGQ1EqJxtTFe.E9ifZ.0O2inml3sEcLaWFyK9EdmCelmZ2l2Ez8e" }); \ No newline at end of file