aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/App.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/App.vue')
-rw-r--r--src/App.vue17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/App.vue b/src/App.vue
index 5c62a7f..fda13c3 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -30,18 +30,22 @@
30 :links="config.links" 30 :links="config.links"
31 @navbar-toggle="showMenu = !showMenu" 31 @navbar-toggle="showMenu = !showMenu"
32 > 32 >
33 <DarkMode @updated="isDark = $event" /> 33 <DarkMode
34 @updated="isDark = $event"
35 :defaultValue="this.config.defaults.colorTheme"
36 />
34 37
35 <SettingToggle 38 <SettingToggle
36 @updated="vlayout = $event" 39 @updated="vlayout = $event"
37 name="vlayout" 40 name="vlayout"
38 icon="fa-list" 41 icon="fa-list"
39 iconAlt="fa-columns" 42 iconAlt="fa-columns"
43 :defaultValue="this.config.defaults.layout == 'columns'"
40 /> 44 />
41 45
42 <SearchInput 46 <SearchInput
43 class="navbar-item is-inline-block-mobile" 47 class="navbar-item is-inline-block-mobile"
44 :hotkey=searchHotkey() 48 :hotkey="searchHotkey()"
45 @input="filterServices" 49 @input="filterServices"
46 @search-focus="showMenu = true" 50 @search-focus="showMenu = true"
47 @search-open="navigateToFirstService" 51 @search-open="navigateToFirstService"
@@ -56,6 +60,9 @@
56 v-if="config.connectivityCheck" 60 v-if="config.connectivityCheck"
57 @network-status-update="offline = $event" 61 @network-status-update="offline = $event"
58 /> 62 />
63
64 <GetStarted v-if="loaded && !services" />
65
59 <div v-if="!offline"> 66 <div v-if="!offline">
60 <!-- Optional messages --> 67 <!-- Optional messages -->
61 <Message :item="config.message" /> 68 <Message :item="config.message" />
@@ -130,6 +137,7 @@ const jsyaml = require("js-yaml");
130const merge = require("lodash.merge"); 137const merge = require("lodash.merge");
131 138
132import Navbar from "./components/Navbar.vue"; 139import Navbar from "./components/Navbar.vue";
140import GetStarted from "./components/GetStarted.vue";
133import ConnectivityChecker from "./components/ConnectivityChecker.vue"; 141import ConnectivityChecker from "./components/ConnectivityChecker.vue";
134import Service from "./components/Service.vue"; 142import Service from "./components/Service.vue";
135import Message from "./components/Message.vue"; 143import Message from "./components/Message.vue";
@@ -144,6 +152,7 @@ export default {
144 name: "App", 152 name: "App",
145 components: { 153 components: {
146 Navbar, 154 Navbar,
155 GetStarted,
147 ConnectivityChecker, 156 ConnectivityChecker,
148 Service, 157 Service,
149 Message, 158 Message,
@@ -154,6 +163,7 @@ export default {
154 }, 163 },
155 data: function () { 164 data: function () {
156 return { 165 return {
166 loaded: false,
157 config: null, 167 config: null,
158 services: null, 168 services: null,
159 offline: false, 169 offline: false,
@@ -166,6 +176,7 @@ export default {
166 created: async function () { 176 created: async function () {
167 this.buildDashboard(); 177 this.buildDashboard();
168 window.onhashchange = this.buildDashboard; 178 window.onhashchange = this.buildDashboard;
179 this.loaded = true;
169 }, 180 },
170 methods: { 181 methods: {
171 searchHotkey() { 182 searchHotkey() {
@@ -193,6 +204,7 @@ export default {
193 } 204 }
194 this.config = merge(defaults, config); 205 this.config = merge(defaults, config);
195 this.services = this.config.services; 206 this.services = this.config.services;
207
196 document.title = 208 document.title =
197 this.config.documentTitle || 209 this.config.documentTitle ||
198 `${this.config.title} | ${this.config.subtitle}`; 210 `${this.config.title} | ${this.config.subtitle}`;
@@ -211,6 +223,7 @@ export default {
211 window.location.href = response.url; 223 window.location.href = response.url;
212 return; 224 return;
213 } 225 }
226
214 if (!response.ok) { 227 if (!response.ok) {
215 throw Error(`${response.statusText}: ${response.body}`); 228 throw Error(`${response.statusText}: ${response.body}`);
216 } 229 }