diff --git a/frontend/resources/locales.json b/frontend/resources/locales.json index ceddb5b7b..99362eba2 100644 --- a/frontend/resources/locales.json +++ b/frontend/resources/locales.json @@ -3689,10 +3689,10 @@ "workspace.toolbar.image" : { "used-in" : [ "src/app/main/ui/workspace/left_toolbar.cljs:79" ], "translations" : { - "en" : "Image (I)", - "fr" : "Image (I)", - "ru" : "Изображение (I)", - "es" : "Imagen (I)" + "en" : "Image (K)", + "fr" : "Image (K)", + "ru" : "Изображение (K)", + "es" : "Imagen (K)" } }, "workspace.toolbar.libraries" : { diff --git a/frontend/src/app/main/data/workspace.cljs b/frontend/src/app/main/data/workspace.cljs index 99fbecd7d..724c987bd 100644 --- a/frontend/src/app/main/data/workspace.cljs +++ b/frontend/src/app/main/data/workspace.cljs @@ -44,6 +44,7 @@ [app.util.transit :as t] [app.util.webapi :as wapi] [app.util.i18n :refer [tr] :as i18n] + [app.util.dom :as dom] [beicon.core :as rx] [cljs.spec.alpha :as s] [clojure.set :as set] @@ -1674,6 +1675,9 @@ "t" #(st/emit! dwtxt/start-edit-if-selected (dwd/select-for-drawing :text)) "p" #(st/emit! (dwd/select-for-drawing :path)) + "k" (fn [event] + (let [image-upload (dom/get-element "image-upload")] + (dom/click image-upload))) (c-mod "c") #(st/emit! copy-selected) (c-mod "x") #(st/emit! copy-selected delete-selected) "escape" #(st/emit! (esc-pressed)) diff --git a/frontend/src/app/main/ui/workspace/left_toolbar.cljs b/frontend/src/app/main/ui/workspace/left_toolbar.cljs index 5137d3fde..fc96f2f7c 100644 --- a/frontend/src/app/main/ui/workspace/left_toolbar.cljs +++ b/frontend/src/app/main/ui/workspace/left_toolbar.cljs @@ -80,10 +80,11 @@ :on-click on-image} [:* i/image - [:& file-uploader {:accept cm/str-media-types - :multi true - :input-ref file-input - :on-selected on-files-selected}]]] + [:& file-uploader {:input-id "image-upload" + :accept cm/str-media-types + :multi true + :input-ref file-input + :on-selected on-files-selected}]]] [:li.tooltip.tooltip-right {:alt (t locale "workspace.toolbar.curve") :class (when (= selected-drawtool :curve) "selected")