|
|
@@ -18,13 +18,19 @@
|
|
|
[:div
|
|
|
[:p.mb-4 "Press any sequence of keys to set the shortcut for the " [:b action-name] " action."]
|
|
|
[:p.mb-4.mt-4
|
|
|
- (map-indexed (fn [i key]
|
|
|
- [:span.keyboard-shortcut {:key i}
|
|
|
- [:code {:style {:font-size "1.5em" :margin-right "8px"}}
|
|
|
- (clojure.string/replace key "meta" "cmd")]])
|
|
|
- (-> keyboard-shortcut
|
|
|
- (clojure.string/trim)
|
|
|
- (clojure.string/split #" |\+")))]]
|
|
|
+ (ui/keyboard-shortcut (-> keyboard-shortcut
|
|
|
+ (clojure.string/trim)
|
|
|
+ (clojure.string/split #" |\+")))
|
|
|
+ #_(map-indexed (fn [i key]
|
|
|
+ [:span.keyboard-shortcut {:key i}
|
|
|
+ [:code {:style {:font-size "1.5em" :margin-right "8px"}}
|
|
|
+ ;; When displaying to the user, use "cmd" rather than
|
|
|
+ ;; "meta" to describe the Mac mod key, because that's
|
|
|
+ ;; what the Mac keyboards actually say.
|
|
|
+ (clojure.string/replace key "meta" "cmd")]])
|
|
|
+ (-> keyboard-shortcut
|
|
|
+ (clojure.string/trim)
|
|
|
+ (clojure.string/split #" |\+")))]]
|
|
|
[:div.cancel-save-buttons.text-right.mt-4
|
|
|
(ui/button "Save" :on-click state/close-modal!)
|
|
|
[:a.ml-4
|