diff options
author | Bastien Wirtz <bastien.wirtz@gmail.com> | 2021-10-25 04:46:58 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-25 04:46:58 -0700 |
commit | cf33747f4272baf124b99af9ed8efcca07d1d6b9 (patch) | |
tree | 3baf349e66ca008b80c1f52d6b2bba7b325b592e /src/App.vue | |
parent | 46c9a513e5159797a46f5199abfbfa457c548688 (diff) | |
parent | 446e78d2ab78b19a621e4a66297f774de1041c01 (diff) | |
download | homer-cf33747f4272baf124b99af9ed8efcca07d1d6b9.tar.gz homer-cf33747f4272baf124b99af9ed8efcca07d1d6b9.tar.zst homer-cf33747f4272baf124b99af9ed8efcca07d1d6b9.zip |
Merge pull request #274 from robinschneider/hotkey
Added custom hotkey support
Diffstat (limited to 'src/App.vue')
-rw-r--r-- | src/App.vue | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/App.vue b/src/App.vue index c263c8a..5c62a7f 100644 --- a/src/App.vue +++ b/src/App.vue | |||
@@ -41,6 +41,7 @@ | |||
41 | 41 | ||
42 | <SearchInput | 42 | <SearchInput |
43 | class="navbar-item is-inline-block-mobile" | 43 | class="navbar-item is-inline-block-mobile" |
44 | :hotkey=searchHotkey() | ||
44 | @input="filterServices" | 45 | @input="filterServices" |
45 | @search-focus="showMenu = true" | 46 | @search-focus="showMenu = true" |
46 | @search-open="navigateToFirstService" | 47 | @search-open="navigateToFirstService" |
@@ -167,6 +168,11 @@ export default { | |||
167 | window.onhashchange = this.buildDashboard; | 168 | window.onhashchange = this.buildDashboard; |
168 | }, | 169 | }, |
169 | methods: { | 170 | methods: { |
171 | searchHotkey() { | ||
172 | if (this.config.hotkey && this.config.hotkey.search) { | ||
173 | return this.config.hotkey.search; | ||
174 | } | ||
175 | }, | ||
170 | buildDashboard: async function () { | 176 | buildDashboard: async function () { |
171 | const defaults = jsyaml.load(defaultConfig); | 177 | const defaults = jsyaml.load(defaultConfig); |
172 | let config; | 178 | let config; |