first API query from UI!

This commit is contained in:
Jörn-Michael Miehe 2022-09-15 22:51:50 +00:00
parent 1d8748e63a
commit ba7c2bd926

View file

@ -42,6 +42,7 @@
<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import { AxiosResponse } from "axios";
import TitleBar from "./components/title/TitleBar.vue";
import Dashboard from "./components/Dashboard.vue";
@ -82,6 +83,21 @@ export default class App extends Vue {
private ticker_html = "<p>changeme</p>";
private ticker_color = "primary";
private update_logo(response: AxiosResponse): void {
this.logo_above = response.data.above;
this.logo_below = response.data.below;
}
private update(): void {
this.$axios
.get(this.$ovdashboard.api_url("misc/config/logo"))
.then(this.update_logo);
}
public mounted(): void {
this.update();
}
}
</script>