]> git.immae.eu Git - github/bastienwirtz/homer.git/commitdiff
Merged main, fixed hotkey support 274/head
authorRobin Schneider <robin-schneider@outlook.de>
Tue, 12 Oct 2021 12:36:22 +0000 (14:36 +0200)
committerRobin Schneider <robin-schneider@outlook.de>
Tue, 12 Oct 2021 12:36:22 +0000 (14:36 +0200)
src/App.vue

index a0de3386b6ebaa0e9fa4fe20d3f4e5e2140ee60e..5c62a7fb409cfe65695870d8f54993d5c684e887 100644 (file)
@@ -41,7 +41,7 @@
 
         <SearchInput
           class="navbar-item is-inline-block-mobile"
-          :hotkey="config.hotkey.search"
+          :hotkey=searchHotkey()
           @input="filterServices"
           @search-focus="showMenu = true"
           @search-open="navigateToFirstService"
@@ -168,6 +168,11 @@ export default {
     window.onhashchange = this.buildDashboard;
   },
   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;