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); } }