From 738be6e667490e74d7afa90759471748df45dd7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= <40151420+ldericher@users.noreply.github.com> Date: Sat, 24 Sep 2022 01:37:26 +0000 Subject: [PATCH] "Vue" implementation with interval --- ui/src/App.vue | 45 ++++++---------------------- ui/src/components/title/THWLogo.vue | 30 +++++++++++++++---- ui/src/components/title/TitleBar.vue | 24 ++++++++++----- ui/src/ovd-vue.ts | 17 +++++++++++ 4 files changed, 66 insertions(+), 50 deletions(-) create mode 100644 ui/src/ovd-vue.ts diff --git a/ui/src/App.vue b/ui/src/App.vue index d6d40f6..ab44f7d 100644 --- a/ui/src/App.vue +++ b/ui/src/App.vue @@ -1,11 +1,7 @@ diff --git a/ui/src/components/title/TitleBar.vue b/ui/src/components/title/TitleBar.vue index d3f72a9..cb7b05f 100644 --- a/ui/src/components/title/TitleBar.vue +++ b/ui/src/components/title/TitleBar.vue @@ -2,7 +2,7 @@
- +
diff --git a/ui/src/ovd-vue.ts b/ui/src/ovd-vue.ts new file mode 100644 index 0000000..ecd9a1c --- /dev/null +++ b/ui/src/ovd-vue.ts @@ -0,0 +1,17 @@ +import { Vue as _Vue } from "vue-property-decorator"; +export * from "vue-property-decorator"; + +export abstract class Vue extends _Vue { + private interval?: number; + + protected abstract update(): void; + + public created(): void { + this.update(); + this.interval = setInterval(this.update, 30000); + } + + public beforeDestroy(): void { + clearInterval(this.interval); + } +}