X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=src%2FApp.vue;h=fda13c31e07ef4cb7bcf5f1e50365d29f8fe4e65;hb=585844394d7a4cc4a58e30fd42cb1f8e83ac02f7;hp=c263c8a0572ee096ba8ca6e17c63cf09568a378f;hpb=7a4e78e8d0448541e76f6052c45f00b30cdf60e1;p=github%2Fbastienwirtz%2Fhomer.git
diff --git a/src/App.vue b/src/App.vue
index c263c8a..fda13c3 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -30,17 +30,22 @@
:links="config.links"
@navbar-toggle="showMenu = !showMenu"
>
-
+
+
+
+
@@ -129,6 +137,7 @@ const jsyaml = require("js-yaml");
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";
@@ -143,6 +152,7 @@ export default {
name: "App",
components: {
Navbar,
+ GetStarted,
ConnectivityChecker,
Service,
Message,
@@ -153,6 +163,7 @@ export default {
},
data: function () {
return {
+ loaded: false,
config: null,
services: null,
offline: false,
@@ -165,8 +176,14 @@ export default {
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;
@@ -187,6 +204,7 @@ export default {
}
this.config = merge(defaults, config);
this.services = this.config.services;
+
document.title =
this.config.documentTitle ||
`${this.config.title} | ${this.config.subtitle}`;
@@ -205,6 +223,7 @@ export default {
window.location.href = response.url;
return;
}
+
if (!response.ok) {
throw Error(`${response.statusText}: ${response.body}`);
}