Browse Source

Set Shortcut to filter assignees

nikolaj.bassauer 1 year ago
parent
commit
22b40aab5d
1 changed files with 12 additions and 0 deletions
  1. 12 0
      client/lib/keyboard.js

+ 12 - 0
client/lib/keyboard.js

@@ -33,6 +33,14 @@ Mousetrap.bind('q', () => {
   }
 });
 
+Mousetrap.bind('a', () => {
+  const currentBoardId = Session.get('currentBoard');
+  const currentUserId = Meteor.userId();
+  if (currentBoardId && currentUserId) {
+    Filter.assignees.toggle(currentUserId);
+  }
+});
+
 Mousetrap.bind('x', () => {
   if (Filter.isActive()) {
     Filter.reset();
@@ -181,6 +189,10 @@ Template.keyboardShortcuts.helpers({
       keys: ['q'],
       action: 'shortcut-filter-my-cards',
     },
+    {
+      keys: ['a'],
+      action: 'shortcut-filter-my-cards',
+    },
     {
       keys: ['f'],
       action: 'shortcut-toggle-filterbar',