aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/App.vue
diff options
context:
space:
mode:
authorBastien Wirtz <bastien.wirtz@gmail.com>2022-03-11 22:47:26 +0100
committerBastien Wirtz <bastien.wirtz@gmail.com>2022-03-11 22:47:26 +0100
commitf3980069351ec91bea1999e5efff5c343a808706 (patch)
treee86760449a59c12d157f5cb5af55523ceff25d86 /src/App.vue
parentdb2a2af3a4664366257957400b9eaadf795808c2 (diff)
downloadhomer-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.vue8
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");
130const merge = require("lodash.merge"); 133const merge = require("lodash.merge");
131 134
132import Navbar from "./components/Navbar.vue"; 135import Navbar from "./components/Navbar.vue";
136import GetStarted from "./components/GetStarted.vue";
133import ConnectivityChecker from "./components/ConnectivityChecker.vue"; 137import ConnectivityChecker from "./components/ConnectivityChecker.vue";
134import Service from "./components/Service.vue"; 138import Service from "./components/Service.vue";
135import Message from "./components/Message.vue"; 139import 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}`;