<SearchInput
class="navbar-item is-inline-block-mobile"
+ :hotkey="searchHotkey()"
@input="filterServices"
@search-focus="showMenu = true"
@search-open="navigateToFirstService"
v-if="config.connectivityCheck"
@network-status-update="offline = $event"
/>
+
+ <GetStarted v-if="loaded && !services" />
+
<div v-if="!offline">
<!-- Optional messages -->
<Message :item="config.message" />
const merge = require("lodash.merge");
import Navbar from "./components/Navbar.vue";
+import GetStarted from "./components/GetStarted.vue";
import ConnectivityChecker from "./components/ConnectivityChecker.vue";
import Service from "./components/Service.vue";
import Message from "./components/Message.vue";
name: "App",
components: {
Navbar,
+ GetStarted,
ConnectivityChecker,
Service,
Message,
},
data: function () {
return {
+ loaded: false,
config: null,
services: null,
offline: false,
created: async function () {
this.buildDashboard();
window.onhashchange = this.buildDashboard;
+ this.loaded = true;
},
methods: {
+ searchHotkey() {
+ if (this.config.hotkey && this.config.hotkey.search) {
+ return this.config.hotkey.search;
+ }
+ },
buildDashboard: async function () {
const defaults = jsyaml.load(defaultConfig);
let config;
}
this.config = merge(defaults, config);
this.services = this.config.services;
+
document.title =
this.config.documentTitle ||
`${this.config.title} | ${this.config.subtitle}`;
window.location.href = response.url;
return;
}
+
if (!response.ok) {
throw Error(`${response.statusText}: ${response.body}`);
}