From 189da9bcf3f5dfe0edce06d2497d807fb8f710e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= <40151420+ldericher@users.noreply.github.com> Date: Fri, 16 Sep 2022 14:29:55 +0000 Subject: [PATCH] update interval --- ui/src/App.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ui/src/App.vue b/ui/src/App.vue index baf6af8..dbcecc1 100644 --- a/ui/src/App.vue +++ b/ui/src/App.vue @@ -63,6 +63,9 @@ import TickerBar from "./components/TickerBar.vue"; }, }) export default class App extends Vue { + private interval?: number; + + // API data private logo_above = "Technisches Hilfswerk"; private logo_below = "OV Musterstadt"; private title_html = "

changeme

"; @@ -181,8 +184,13 @@ export default class App extends Vue { }); } - public mounted(): void { + public created(): void { this.update(); + this.interval = setInterval(this.update, 30000); + } + + public beforeDestroy(): void { + clearInterval(this.interval); } }