wait for fetchServerStatus before calling fetchServerStats

This commit is contained in:
Emily Wotruba 2024-05-21 20:49:59 +02:00 committed by Bastien Wirtz
parent ce4d3a3dbe
commit 8f7752a0b8

View File

@ -80,14 +80,14 @@ export default {
}, },
}, },
created() { created() {
this.fetchServerStatus(); this.fetchServerStatus().then(() => {
if (!this.item.subtitle && this.status !== "dead") { if (!this.item.subtitle && this.status !== "dead") {
if (!this.item.items) this.item.items = ["name", "version"]; if (!this.item.items) this.item.items = ["name", "version"];
if (!this.item.separator) this.item.separator = " "; if (!this.item.separator) this.item.separator = " ";
if (!this.item.logo) this.item.logo = `${this.item.url}/static/icons/favicon-192x192.png`; if (!this.item.logo) this.item.logo = `${this.item.url}/static/icons/favicon-192x192.png`;
this.fetchServerStats(); this.fetchServerStats();
} }
});
}, },
methods: { methods: {
fetchServerStatus: async function () { fetchServerStatus: async function () {