From 295c9c8617c6efe180fdc29b4b1183d570b62642 Mon Sep 17 00:00:00 2001 From: Nadav Tasher Date: Wed, 25 Dec 2024 00:23:18 +0200 Subject: [PATCH] Allow toggling profile.keyboardShortcuts from boardHeader --- client/components/boards/boardHeader.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client/components/boards/boardHeader.js b/client/components/boards/boardHeader.js index 1f450e935..30c6457f8 100644 --- a/client/components/boards/boardHeader.js +++ b/client/components/boards/boardHeader.js @@ -45,6 +45,11 @@ BlazeComponent.extendComponent({ return user && user.isAutoWidth(boardId); }, + isKeyboardShortcuts() { + const user = ReactiveCache.getCurrentUser(); + return user && user.isKeyboardShortcuts(); + }, + // Only show the star counter if the number of star is greater than 2 showStarCounter() { const currentBoard = Utils.getCurrentBoard(); @@ -82,6 +87,9 @@ BlazeComponent.extendComponent({ dragscroll.reset(); ReactiveCache.getCurrentUser().toggleAutoWidth(Utils.getCurrentBoardId()); }, + 'click .js-keyboard-shortcuts-toggle'() { + ReactiveCache.getCurrentUser().toggleKeyboardShortcuts(); + }, 'click .js-open-board-menu': Popup.open('boardMenu'), 'click .js-change-visibility': Popup.open('boardChangeVisibility'), 'click .js-watch-board': Popup.open('boardChangeWatch'),