From ab04fe3bfd6f58c8e06b72aea1818fbf7d13aec0 Mon Sep 17 00:00:00 2001 From: Gabriel Horner Date: Wed, 24 Aug 2022 09:57:56 -0400 Subject: [PATCH] Electron only commands should only show up in electron Follow up to #6443 --- src/main/frontend/modules/shortcut/config.cljs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/main/frontend/modules/shortcut/config.cljs b/src/main/frontend/modules/shortcut/config.cljs index 48c55fed251..1083b35a036 100644 --- a/src/main/frontend/modules/shortcut/config.cljs +++ b/src/main/frontend/modules/shortcut/config.cljs @@ -250,18 +250,16 @@ (route-handler/go-to-search! :global))} :go/electron-find-in-page {:binding "mod+f" - :fn #(when (util/electron?) - (search-handler/open-find-in-page!))} - + :inactive (not (util/electron?)) + :fn #(search-handler/open-find-in-page!)} + :go/electron-jump-to-the-next {:binding ["enter" "mod+g"] - :fn (fn [_state _e] - (when (util/electron?) - (search-handler/loop-find-in-page! false)))} + :inactive (not (util/electron?)) + :fn #(search-handler/loop-find-in-page! false)} :go/electron-jump-to-the-previous {:binding ["shift+enter" "mod+shift+g"] - :fn (fn [_state _e] - (when (util/electron?) - (search-handler/loop-find-in-page! true)))} + :inactive (not (util/electron?)) + :fn #(search-handler/loop-find-in-page! true)} :go/journals {:binding "g j" :fn route-handler/go-to-journals!}