Tienson Qin 2 лет назад
Родитель
Сommit
38fc05278c
1 измененных файлов с 7 добавлено и 6 удалено
  1. 7 6
      src/main/frontend/ui.cljs

+ 7 - 6
src/main/frontend/ui.cljs

@@ -166,12 +166,13 @@
                    sequence)]
     [:span.keyboard-shortcut
      (map-indexed (fn [i key]
-                    [:code {:key i}
-                   ;; Display "cmd" rather than "meta" to the user to describe the Mac
-                   ;; mod key, because that's what the Mac keyboards actually say.
-                     (if (or (= :meta key) (= "meta" key))
-                       (util/meta-key-name)
-                       (name key))])
+                    (let [key' (shortcut-helper/decorate-binding (str key))]
+                      [:code {:key i}
+                      ;; Display "cmd" rather than "meta" to the user to describe the Mac
+                      ;; mod key, because that's what the Mac keyboards actually say.
+                       (if (= "meta" key')
+                        (util/meta-key-name)
+                        key')]))
                   sequence)]))
 
 (rum/defc menu-link