focus the search
This commit is contained in:
parent
474208434d
commit
e4082f2599
2 changed files with 9 additions and 2 deletions
|
@ -63,9 +63,9 @@ export default class Thumbar {
|
|||
{role: 'togglefullscreen'},
|
||||
{type: 'separator'},
|
||||
{
|
||||
label: utils.getLocale(utils.getStoreValue('general.language'), 'menubar.options.search'),
|
||||
label: utils.getLocale(utils.getStoreValue('general.language'), 'menubar.options.search'),
|
||||
accelerator: utils.getStoreValue("general.keybindings.search").join('+'),
|
||||
click: () => utils.getWindow().webContents.executeJavaScript(`app.appRoute('search')`)
|
||||
click: () => utils.getWindow().webContents.executeJavaScript('app.focusSearch()')
|
||||
},
|
||||
{type:'separator'},
|
||||
{
|
||||
|
|
|
@ -2165,6 +2165,13 @@ const app = new Vue({
|
|||
sortArtists()
|
||||
}
|
||||
},
|
||||
focusSearch() {
|
||||
app.appRoute('search')
|
||||
const search = document.getElementsByClassName("search-input")
|
||||
if (search.length > 0) {
|
||||
search[0].focus()
|
||||
}
|
||||
},
|
||||
getSidebarItemClass(page) {
|
||||
if (this.page == page) {
|
||||
return ["active"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue