diff options
author | Bastien Wirtz <bastien.wirtz@gmail.com> | 2022-03-11 22:47:26 +0100 |
---|---|---|
committer | Bastien Wirtz <bastien.wirtz@gmail.com> | 2022-03-11 22:47:26 +0100 |
commit | f3980069351ec91bea1999e5efff5c343a808706 (patch) | |
tree | e86760449a59c12d157f5cb5af55523ceff25d86 /src/App.vue | |
parent | db2a2af3a4664366257957400b9eaadf795808c2 (diff) | |
download | homer-f3980069351ec91bea1999e5efff5c343a808706.tar.gz homer-f3980069351ec91bea1999e5efff5c343a808706.tar.zst homer-f3980069351ec91bea1999e5efff5c343a808706.zip |
Add a get started link when no configuration is found
Diffstat (limited to 'src/App.vue')
-rw-r--r-- | src/App.vue | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/App.vue b/src/App.vue index 9a67a33..d2cb3ad 100644 --- a/src/App.vue +++ b/src/App.vue | |||
@@ -56,6 +56,9 @@ | |||
56 | v-if="config.connectivityCheck" | 56 | v-if="config.connectivityCheck" |
57 | @network-status-update="offline = $event" | 57 | @network-status-update="offline = $event" |
58 | /> | 58 | /> |
59 | |||
60 | <GetStarted v-if="loaded && !services" /> | ||
61 | |||
59 | <div v-if="!offline"> | 62 | <div v-if="!offline"> |
60 | <!-- Optional messages --> | 63 | <!-- Optional messages --> |
61 | <Message :item="config.message" /> | 64 | <Message :item="config.message" /> |
@@ -130,6 +133,7 @@ const jsyaml = require("js-yaml"); | |||
130 | const merge = require("lodash.merge"); | 133 | const merge = require("lodash.merge"); |
131 | 134 | ||
132 | import Navbar from "./components/Navbar.vue"; | 135 | import Navbar from "./components/Navbar.vue"; |
136 | import GetStarted from "./components/GetStarted.vue"; | ||
133 | import ConnectivityChecker from "./components/ConnectivityChecker.vue"; | 137 | import ConnectivityChecker from "./components/ConnectivityChecker.vue"; |
134 | import Service from "./components/Service.vue"; | 138 | import Service from "./components/Service.vue"; |
135 | import Message from "./components/Message.vue"; | 139 | import Message from "./components/Message.vue"; |
@@ -144,6 +148,7 @@ export default { | |||
144 | name: "App", | 148 | name: "App", |
145 | components: { | 149 | components: { |
146 | Navbar, | 150 | Navbar, |
151 | GetStarted, | ||
147 | ConnectivityChecker, | 152 | ConnectivityChecker, |
148 | Service, | 153 | Service, |
149 | Message, | 154 | Message, |
@@ -154,6 +159,7 @@ export default { | |||
154 | }, | 159 | }, |
155 | data: function () { | 160 | data: function () { |
156 | return { | 161 | return { |
162 | loaded: false, | ||
157 | config: null, | 163 | config: null, |
158 | services: null, | 164 | services: null, |
159 | offline: false, | 165 | offline: false, |
@@ -166,6 +172,7 @@ export default { | |||
166 | created: async function () { | 172 | created: async function () { |
167 | this.buildDashboard(); | 173 | this.buildDashboard(); |
168 | window.onhashchange = this.buildDashboard; | 174 | window.onhashchange = this.buildDashboard; |
175 | this.loaded = true; | ||
169 | }, | 176 | }, |
170 | methods: { | 177 | methods: { |
171 | searchHotkey() { | 178 | searchHotkey() { |
@@ -193,6 +200,7 @@ export default { | |||
193 | } | 200 | } |
194 | this.config = merge(defaults, config); | 201 | this.config = merge(defaults, config); |
195 | this.services = this.config.services; | 202 | this.services = this.config.services; |
203 | |||
196 | document.title = | 204 | document.title = |
197 | this.config.documentTitle || | 205 | this.config.documentTitle || |
198 | `${this.config.title} | ${this.config.subtitle}`; | 206 | `${this.config.title} | ${this.config.subtitle}`; |