X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FApp.vue;h=515177eba13b80d096a89727781655114dadf35d;hb=98b460d6fe0e09cbdbf37f882f5e5bf7daa48e73;hp=81f92f788f6bd63f4818b60b50c8525933a95ceb;hpb=9bb51bb2442b8ba6bcdb4a56509a0f5fbbb36e4e;p=github%2Fbastienwirtz%2Fhomer.git diff --git a/src/App.vue b/src/App.vue index 81f92f7..515177e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -18,7 +18,10 @@ -
+
{{ config.subtitle }}

{{ config.title }}

@@ -61,7 +64,7 @@ @network-status-update="offline = $event" /> - +
@@ -168,6 +171,7 @@ export default { data: function () { return { loaded: false, + configNotFound: false, config: null, services: null, offline: false, @@ -177,6 +181,11 @@ export default { showMenu: false, }; }, + computed: { + configurationNeeded: function () { + return (this.loaded && !this.services) || this.configNotFound; + }, + }, created: async function () { this.buildDashboard(); window.onhashchange = this.buildDashboard; @@ -228,6 +237,11 @@ export default { return; } + if (response.status == 404) { + this.configNotFound = true; + return {}; + } + if (!response.ok) { throw Error(`${response.statusText}: ${response.body}`); }