浏览代码

Shortcut: F toggles filter sidebar

fisle 9 年之前
父节点
当前提交
14b7213af4
共有 2 个文件被更改,包括 12 次插入0 次删除
  1. 11 0
      client/lib/keyboard.js
  2. 1 0
      i18n/en.i18n.json

+ 11 - 0
client/lib/keyboard.js

@@ -23,6 +23,14 @@ Mousetrap.bind('x', () => {
   }
 });
 
+Mousetrap.bind('f', () => {
+  if (Sidebar.isOpen() && Sidebar.getView() === 'filter') {
+    Sidebar.toggle();
+  } else {
+    Sidebar.setView('filter');
+  }
+});
+
 Mousetrap.bind(['down', 'up'], (evt, key) => {
   if (!Session.get('currentCard')) {
     return;
@@ -63,6 +71,9 @@ Template.keyboardShortcuts.helpers({
   }, {
     keys: ['Q'],
     action: 'shortcut-filter-my-cards',
+  }, {
+    keys: ['F'],
+    action: 'shortcut-toggle-filterbar',
   }, {
     keys: ['X'],
     action: 'shortcut-clear-filters',

+ 1 - 0
i18n/en.i18n.json

@@ -184,6 +184,7 @@
     "shortcut-close-dialog": "Close Dialog",
     "shortcut-filter-my-cards": "Filter my cards",
     "shortcut-show-shortcuts": "Bring up this shortcuts list",
+    "shortcut-toggle-filterbar": "Toggle Filter Sidebar",
     "shortcut-toggle-sidebar": "Toggle Board Sidebar",
     "signupPopup-title": "Create an Account",
     "star-board-title": "Click to star this board. It will show up at top of your boards list.",