mirror of https://github.com/bastienwirtz/homer
no longer manipulating props
parent
5872d5fa72
commit
75d8afebe6
|
@ -36,6 +36,9 @@ export default {
|
||||||
status: "",
|
status: "",
|
||||||
version: "",
|
version: "",
|
||||||
entities: 0,
|
entities: 0,
|
||||||
|
location_name: "",
|
||||||
|
separator: " ",
|
||||||
|
items: ["name", "version"],
|
||||||
}),
|
}),
|
||||||
computed: {
|
computed: {
|
||||||
headers: function () {
|
headers: function () {
|
||||||
|
@ -46,8 +49,8 @@ export default {
|
||||||
},
|
},
|
||||||
details: function () {
|
details: function () {
|
||||||
const details = [];
|
const details = [];
|
||||||
const items = this.item.items;
|
const items = this.items;
|
||||||
const separator = this.item.separator;
|
const separator = this.separator;
|
||||||
|
|
||||||
for (const i in items) {
|
for (const i in items) {
|
||||||
const key = items[i];
|
const key = items[i];
|
||||||
|
@ -81,9 +84,9 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
this.fetchServerStatus().then(() => {
|
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.items = this.item.items;
|
||||||
if (!this.item.separator) this.item.separator = " ";
|
if (this.item.separator) this.separator = this.item.separator;
|
||||||
if (!this.item.logo) this.item.logo = `${this.item.url}/static/icons/favicon-192x192.png`;
|
|
||||||
this.fetchServerStats();
|
this.fetchServerStats();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue