mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 04:57:07 -04:00
Add keyboard shortcut for search
This commit is contained in:
parent
5e03507eba
commit
69fc2cd8f8
2 changed files with 13 additions and 0 deletions
|
@ -45,6 +45,14 @@ Mousetrap.bind('f', () => {
|
|||
}
|
||||
});
|
||||
|
||||
Mousetrap.bind('/', () => {
|
||||
if (Sidebar.isOpen() && Sidebar.getView() === 'search') {
|
||||
Sidebar.toggle();
|
||||
} else {
|
||||
Sidebar.setView('search');
|
||||
}
|
||||
});
|
||||
|
||||
Mousetrap.bind(['down', 'up'], (evt, key) => {
|
||||
if (!Session.get('currentCard')) {
|
||||
return;
|
||||
|
@ -118,6 +126,10 @@ Template.keyboardShortcuts.helpers({
|
|||
keys: ['f'],
|
||||
action: 'shortcut-toggle-filterbar',
|
||||
},
|
||||
{
|
||||
keys: ['/'],
|
||||
action: 'shortcut-toggle-searchbar',
|
||||
},
|
||||
{
|
||||
keys: ['x'],
|
||||
action: 'shortcut-clear-filters',
|
||||
|
|
|
@ -488,6 +488,7 @@
|
|||
"shortcut-filter-my-cards": "Filter my cards",
|
||||
"shortcut-show-shortcuts": "Bring up this shortcuts list",
|
||||
"shortcut-toggle-filterbar": "Toggle Filter Sidebar",
|
||||
"shortcut-toggle-searchbar": "Toggle Search Sidebar",
|
||||
"shortcut-toggle-sidebar": "Toggle Board Sidebar",
|
||||
"show-cards-minimum-count": "Show cards count if list contains more than",
|
||||
"sidebar-open": "Open Sidebar",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue