call system status only when app is not hidden

This commit is contained in:
jb-alvarado 2023-11-17 16:30:35 +01:00
parent 03200acf1b
commit 559f4b0d78

View File

@ -105,12 +105,14 @@ async function status() {
async function systemStatus() {
const channel = configStore.configGui[configStore.configID].id
if (!document?.hidden) {
await $fetch<SystemStatistics>(`/api/system/${channel}`, {
method: 'GET',
headers: { ...contentType, ...authStore.authHeader },
}).then((stat: SystemStatistics) => {
sysStat.value = stat
})
}
}
</script>
<style>