mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 14:33:33 -07:00
"/" to open search bar
This commit is contained in:
parent
15159f4268
commit
7c1891b82a
2 changed files with 10 additions and 0 deletions
|
@ -11,6 +11,7 @@
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
<v-expand-x-transition>
|
<v-expand-x-transition>
|
||||||
<SearchBar
|
<SearchBar
|
||||||
|
ref="mainSearchBar"
|
||||||
class="mt-7"
|
class="mt-7"
|
||||||
v-if="search"
|
v-if="search"
|
||||||
:show-results="true"
|
:show-results="true"
|
||||||
|
@ -55,6 +56,13 @@ export default {
|
||||||
this.search = false;
|
this.search = false;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
window.addEventListener("keyup", e => {
|
||||||
|
if (e.key == "/") {
|
||||||
|
this.search = !this.search;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$store.dispatch("initTheme");
|
this.$store.dispatch("initTheme");
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
hide-no-data
|
hide-no-data
|
||||||
cache-items
|
cache-items
|
||||||
solo
|
solo
|
||||||
|
autofocus
|
||||||
|
auto-select-first
|
||||||
>
|
>
|
||||||
<template
|
<template
|
||||||
v-if="showResults"
|
v-if="showResults"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue