From a24d5676a6cae5ef709501d3452d11793719f3e6 Mon Sep 17 00:00:00 2001 From: Eva Date: Tue, 23 Jan 2024 13:15:35 +0100 Subject: [PATCH] :sparkles: Add change theme shortcut on help section --- frontend/src/app/main/data/dashboard/shortcuts.cljs | 7 ++++--- frontend/src/app/main/data/workspace/shortcuts.cljs | 7 ++++--- frontend/translations/en.po | 3 +++ frontend/translations/es.po | 3 +++ 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/frontend/src/app/main/data/dashboard/shortcuts.cljs b/frontend/src/app/main/data/dashboard/shortcuts.cljs index 2181e96de..3d27669b6 100644 --- a/frontend/src/app/main/data/dashboard/shortcuts.cljs +++ b/frontend/src/app/main/data/dashboard/shortcuts.cljs @@ -32,9 +32,10 @@ :subsections [:general-dashboard] :fn #(st/emit! (dd/create-element))} - :toggle-light-dark {:tooltip (ds/meta (ds/alt "Q")) - :command (ds/c-mod "alt+q") - :fn #(st/emit! (du/toggle-theme))}}) + :toggle-theme {:tooltip (ds/meta (ds/alt "M")) + :command (ds/c-mod "alt+m") + :subsections [:general-dashboard] + :fn #(st/emit! (du/toggle-theme))}}) (defn get-tooltip [shortcut] (assert (contains? shortcuts shortcut) (str shortcut)) diff --git a/frontend/src/app/main/data/workspace/shortcuts.cljs b/frontend/src/app/main/data/workspace/shortcuts.cljs index 81689f6b2..b5d91faa3 100644 --- a/frontend/src/app/main/data/workspace/shortcuts.cljs +++ b/frontend/src/app/main/data/workspace/shortcuts.cljs @@ -551,9 +551,10 @@ ;; THEME - :toggle-light-dark {:tooltip (ds/meta (ds/alt "Q")) - :command (ds/c-mod "alt+q") - :fn #(st/emit! (du/toggle-theme))}}) + :toggle-theme {:tooltip (ds/meta (ds/alt "M")) + :command (ds/c-mod "alt+m") + :subsections [:basics] + :fn #(st/emit! (du/toggle-theme))}}) (def opacity-shortcuts (into {} (->> diff --git a/frontend/translations/en.po b/frontend/translations/en.po index 428cf98f5..0affa485f 100644 --- a/frontend/translations/en.po +++ b/frontend/translations/en.po @@ -2976,6 +2976,9 @@ msgstr "Snap to guides" msgid "shortcuts.toggle-textpalette" msgstr "Toggle text palette" +msgid "shortcuts.toggle-theme" +msgstr "Change theme" + msgid "shortcuts.toggle-visibility" msgstr "Show / Hide" diff --git a/frontend/translations/es.po b/frontend/translations/es.po index be493d3c2..fbd44e23a 100644 --- a/frontend/translations/es.po +++ b/frontend/translations/es.po @@ -3022,6 +3022,9 @@ msgstr "Alinear a las guias" msgid "shortcuts.toggle-textpalette" msgstr "Mostrar/ocultar paleta de textos" +msgid "shortcuts.toggle-theme" +msgstr "Cambiar tema" + msgid "shortcuts.toggle-visibility" msgstr "Mostrar/ocultar elemento"