From f7bba745ab9aeef02d87338ff6937118d56c4f9a Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Mon, 27 Mar 2023 12:09:33 +0200 Subject: [PATCH] :bug: Changes to the header menu --- .../src/app/main/ui/workspace/header.cljs | 22 ++++++++++++++----- frontend/translations/en.po | 12 ++++++++++ frontend/translations/es.po | 12 ++++++++++ 3 files changed, 40 insertions(+), 6 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/header.cljs b/frontend/src/app/main/ui/workspace/header.cljs index 8c5418ff4..1ccd70f2a 100644 --- a/frontend/src/app/main/ui/workspace/header.cljs +++ b/frontend/src/app/main/ui/workspace/header.cljs @@ -15,6 +15,7 @@ [app.main.data.modal :as modal] [app.main.data.workspace :as dw] [app.main.data.workspace.colors :as dc] + [app.main.data.workspace.common :as dwc] [app.main.data.workspace.libraries :as dwl] [app.main.data.workspace.shortcuts :as sc] [app.main.refs :as refs] @@ -306,12 +307,14 @@ [:li {:on-click #(st/emit! (dw/select-all))} [:span (tr "workspace.header.menu.select-all")] [:span.shortcut (sc/get-tooltip :select-all)]] - [:li {:on-click #(st/emit! (toggle-flag :scale-text))} - [:span - (if (contains? layout :scale-text) - (tr "workspace.header.menu.disable-scale-text") - (tr "workspace.header.menu.enable-scale-text"))] - [:span.shortcut (sc/get-tooltip :toggle-scale-text)]]]] + + [:li {:on-click #(st/emit! dwc/undo)} + [:span (tr "workspace.header.menu.undo")] + [:span.shortcut (sc/get-tooltip :undo)]] + + [:li {:on-click #(st/emit! dwc/redo)} + [:span (tr "workspace.header.menu.redo")] + [:span.shortcut (sc/get-tooltip :redo)]]]] [:& dropdown {:show (= @show-sub-menu? :view) :on-close #(reset! show-sub-menu? false)} @@ -374,6 +377,13 @@ [:& dropdown {:show (= @show-sub-menu? :preferences) :on-close #(reset! show-sub-menu? false)} [:ul.sub-menu.preferences + [:li {:on-click #(st/emit! (toggle-flag :scale-text))} + [:span + (if (contains? layout :scale-text) + (tr "workspace.header.menu.disable-scale-content") + (tr "workspace.header.menu.enable-scale-content"))] + [:span.shortcut (sc/get-tooltip :toggle-scale-text)]] + [:li {:on-click #(st/emit! (toggle-flag :snap-guides))} [:span (if (contains? layout :snap-guides) diff --git a/frontend/translations/en.po b/frontend/translations/en.po index 75e81ef1e..41756fd41 100644 --- a/frontend/translations/en.po +++ b/frontend/translations/en.po @@ -3049,6 +3049,18 @@ msgstr "Show rulers" msgid "workspace.header.menu.show-textpalette" msgstr "Show fonts palette" +msgid "workspace.header.menu.enable-scale-content" +msgstr "Enable proportional scale" + +msgid "workspace.header.menu.disable-scale-content" +msgstr "Disable proportional scale" + +msgid "workspace.header.menu.undo" +msgstr "Undo" + +msgid "workspace.header.menu.redo" +msgstr "Redo" + #: src/app/main/ui/workspace/header.cljs msgid "workspace.header.reset-zoom" msgstr "Reset" diff --git a/frontend/translations/es.po b/frontend/translations/es.po index 19b30a575..e644c7d21 100644 --- a/frontend/translations/es.po +++ b/frontend/translations/es.po @@ -3212,6 +3212,18 @@ msgstr "Mostrar reglas" msgid "workspace.header.menu.show-textpalette" msgstr "Mostrar paleta de textos" +msgid "workspace.header.menu.enable-scale-content" +msgstr "Activar escala proporcional" + +msgid "workspace.header.menu.disable-scale-content" +msgstr "Desactivar escala proporcional" + +msgid "workspace.header.menu.undo" +msgstr "Deshacer" + +msgid "workspace.header.menu.redo" +msgstr "Rehacer" + #: src/app/main/ui/workspace/header.cljs msgid "workspace.header.reset-zoom" msgstr "Restablecer"