Message self update
This commit is contained in:
parent
27fd17200b
commit
6f455869a5
2 changed files with 19 additions and 12 deletions
|
@ -5,7 +5,7 @@
|
||||||
<Dashboard>
|
<Dashboard>
|
||||||
<template slot="message">
|
<template slot="message">
|
||||||
<div class="d-flex flex-column fill-height">
|
<div class="d-flex flex-column fill-height">
|
||||||
<Message :html="message_html" />
|
<Message />
|
||||||
<ImageCarousel class="mt-auto" />
|
<ImageCarousel class="mt-auto" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -50,8 +50,6 @@ import TickerBar from "./components/TickerBar.vue";
|
||||||
})
|
})
|
||||||
export default class App extends Vue {
|
export default class App extends Vue {
|
||||||
// API data
|
// API data
|
||||||
private message_html = require("@/assets/message_testdata.json");
|
|
||||||
|
|
||||||
private calendar_data: CalendarData[] = require("@/assets/calendar_testdata.json");
|
private calendar_data: CalendarData[] = require("@/assets/calendar_testdata.json");
|
||||||
private calendar_speed = 10000;
|
private calendar_speed = 10000;
|
||||||
private server_host = "https://oekzident.de";
|
private server_host = "https://oekzident.de";
|
||||||
|
@ -68,12 +66,6 @@ export default class App extends Vue {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected update(): void {
|
protected update(): void {
|
||||||
// Update Message
|
|
||||||
this.$ovdashboard.api_get_string(
|
|
||||||
"text/get/html/message",
|
|
||||||
(data) => (this.message_html = data)
|
|
||||||
);
|
|
||||||
|
|
||||||
// Update Calendar Aggregates
|
// Update Calendar Aggregates
|
||||||
this.$ovdashboard.api_get_list("aggregate/list", (names) => {
|
this.$ovdashboard.api_get_list("aggregate/list", (names) => {
|
||||||
this.$ovdashboard.api_get_object_multi<EventData[]>(
|
this.$ovdashboard.api_get_object_multi<EventData[]>(
|
||||||
|
|
|
@ -3,12 +3,27 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Component, Prop, Vue } from "vue-property-decorator";
|
import { Component, Vue } from "@/ovd-vue";
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
export default class Message extends Vue {
|
export default class Message extends Vue {
|
||||||
@Prop({ required: true })
|
private html = require("@/assets/message_testdata.json");
|
||||||
private readonly html!: string;
|
|
||||||
|
public created(): void {
|
||||||
|
super.created();
|
||||||
|
}
|
||||||
|
|
||||||
|
public beforeDestroy(): void {
|
||||||
|
super.beforeDestroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected update(): void {
|
||||||
|
// Update Message
|
||||||
|
this.$ovdashboard.api_get_string(
|
||||||
|
"text/get/html/message",
|
||||||
|
(data) => (this.html = data)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue