feat(frontend): add highlighting for tasks

This commit is contained in:
DCsunset 2020-07-15 19:59:01 -07:00
parent 099543c0e1
commit 92dd18fbe0
3 changed files with 48 additions and 23 deletions

View file

@ -43,13 +43,11 @@ export default defineComponent({
let interval: NodeJS.Timeout | null = null;
const setAutoRefresh = () => {
console.log('Setting inverval');
if (interval)
clearInterval(interval);
const freq = +context.root.$store.state.settings.autoRefresh;
if (freq > 0) {
interval = setInterval(() => {
console.log('Refreshing...');
context.root.$store.dispatch('fetchTasks');
}, +context.root.$store.state.settings.autoRefresh * 60000);
}