"/" to open search bar

This commit is contained in:
hay-kot 2021-02-09 17:48:20 -09:00
commit 7c1891b82a
2 changed files with 10 additions and 0 deletions

View file

@ -11,6 +11,7 @@
<v-spacer></v-spacer>
<v-expand-x-transition>
<SearchBar
ref="mainSearchBar"
class="mt-7"
v-if="search"
:show-results="true"
@ -55,6 +56,13 @@ export default {
this.search = false;
},
},
created() {
window.addEventListener("keyup", e => {
if (e.key == "/") {
this.search = !this.search;
}
});
},
mounted() {
this.$store.dispatch("initTheme");

View file

@ -12,6 +12,8 @@
hide-no-data
cache-items
solo
autofocus
auto-select-first
>
<template
v-if="showResults"