diff options
Diffstat (limited to 'src/App.vue')
-rw-r--r-- | src/App.vue | 18 |
1 files changed, 16 insertions, 2 deletions
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 @@ | |||
18 | </a> | 18 | </a> |
19 | <i v-if="config.icon" :class="config.icon"></i> | 19 | <i v-if="config.icon" :class="config.icon"></i> |
20 | </div> | 20 | </div> |
21 | <div class="dashboard-title"> | 21 | <div |
22 | class="dashboard-title" | ||
23 | :class="{ 'no-logo': !config.icon || !config.logo }" | ||
24 | > | ||
22 | <span class="headline">{{ config.subtitle }}</span> | 25 | <span class="headline">{{ config.subtitle }}</span> |
23 | <h1>{{ config.title }}</h1> | 26 | <h1>{{ config.title }}</h1> |
24 | </div> | 27 | </div> |
@@ -61,7 +64,7 @@ | |||
61 | @network-status-update="offline = $event" | 64 | @network-status-update="offline = $event" |
62 | /> | 65 | /> |
63 | 66 | ||
64 | <GetStarted v-if="loaded && !services" /> | 67 | <GetStarted v-if="configurationNeeded" /> |
65 | 68 | ||
66 | <div v-if="!offline"> | 69 | <div v-if="!offline"> |
67 | <!-- Optional messages --> | 70 | <!-- Optional messages --> |
@@ -168,6 +171,7 @@ export default { | |||
168 | data: function () { | 171 | data: function () { |
169 | return { | 172 | return { |
170 | loaded: false, | 173 | loaded: false, |
174 | configNotFound: false, | ||
171 | config: null, | 175 | config: null, |
172 | services: null, | 176 | services: null, |
173 | offline: false, | 177 | offline: false, |
@@ -177,6 +181,11 @@ export default { | |||
177 | showMenu: false, | 181 | showMenu: false, |
178 | }; | 182 | }; |
179 | }, | 183 | }, |
184 | computed: { | ||
185 | configurationNeeded: function () { | ||
186 | return (this.loaded && !this.services) || this.configNotFound; | ||
187 | }, | ||
188 | }, | ||
180 | created: async function () { | 189 | created: async function () { |
181 | this.buildDashboard(); | 190 | this.buildDashboard(); |
182 | window.onhashchange = this.buildDashboard; | 191 | window.onhashchange = this.buildDashboard; |
@@ -228,6 +237,11 @@ export default { | |||
228 | return; | 237 | return; |
229 | } | 238 | } |
230 | 239 | ||
240 | if (response.status == 404) { | ||
241 | this.configNotFound = true; | ||
242 | return {}; | ||
243 | } | ||
244 | |||
231 | if (!response.ok) { | 245 | if (!response.ok) { |
232 | throw Error(`${response.statusText}: ${response.body}`); | 246 | throw Error(`${response.statusText}: ${response.body}`); |
233 | } | 247 | } |