From a686517b174fc4ef400f24ae1d11243a2fd1fa2b Mon Sep 17 00:00:00 2001 From: charlie Date: Mon, 15 May 2023 16:50:49 +0800 Subject: [PATCH] fix(shortcuts): action name of the custom editing shortcut for plugin shortcuts --- src/main/frontend/components/shortcut.cljs | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/main/frontend/components/shortcut.cljs b/src/main/frontend/components/shortcut.cljs index b6b774508a..4c11aad0a9 100644 --- a/src/main/frontend/components/shortcut.cljs +++ b/src/main/frontend/components/shortcut.cljs @@ -98,17 +98,18 @@ (when-not @*folded? [:tbody (map (fn [[k {:keys [binding]}]] - (let [cmd (dh/shortcut-cmd k)] - [:tr {:key (str k)} - [:td.text-left (cond - (string? (:desc cmd)) - [:span.flex.items-center - [:code.text-xs (namespace k)] - [:small.pl-1 (:desc cmd)]] + (let [cmd (dh/shortcut-cmd k) + label (cond + (string? (:desc cmd)) + [:<> + [:code.text-xs (namespace k)] + [:small.pl-1 (:desc cmd)]] - (not plugin?) (-> k (dh/decorate-namespace) (t)) - :else (str k))] - (shortcut-col category k binding configurable? (t (dh/decorate-namespace k)))])) + (not plugin?) (-> k (dh/decorate-namespace) (t)) + :else (str k))] + [:tr {:key (str k)} + [:td.text-left.flex.items-center label] + (shortcut-col category k binding configurable? label)])) (dh/binding-by-category category))])]])) (rum/defc trigger-table []