🐛 Fix paste as non customizable shortcut

This commit is contained in:
Eva Marco 2026-08-05 09:29:18 +02:00
parent bbbf5a534c
commit f1dac45145
4 changed files with 17 additions and 5 deletions

View File

@ -110,6 +110,7 @@
:command (ds/c-mod "v")
:subsections [:edit]
:section [:workspace]
:customizable false
:fn (constantly nil)}
:paste-replace {:tooltip (ds/meta (ds/shift "V"))

View File

@ -393,6 +393,7 @@
customized? (and (contains? group-map shortcut-key)
(not (str/blank? (get group-map shortcut-key))))]
(and customized?
(not (false? (:customizable shortcut)))
(or (str/blank? search-term)
(matches-search (:translation shortcut) search-term))))))
@ -406,6 +407,7 @@
in-group? (contains? group-map shortcut-key)
blank? (str/blank? (get group-map shortcut-key))]
(and in-group? blank?
(not (false? (:customizable shortcut)))
(or (str/blank? search-term)
(matches-search (:translation shortcut) search-term))))))

View File

@ -612,8 +612,9 @@
(get custom-shortcuts section-key))
group-map (if (map? group-map) group-map {})
customized? (contains? group-map command)
has-conflict? (contains? conflicts command)]
(if editable?
has-conflict? (contains? conflicts command)
customizable? (not (false? (:customizable command-info)))]
(if (and editable? customizable?)
[:> shortcut-row-editable* {:elements elements
:custom-shortcuts custom-shortcuts
:section-key section-key
@ -626,9 +627,13 @@
:data-conflict (str has-conflict?)
:aria-label command-translate
:key command-translate}
[:span {:class (stl/css :command-name)
:id (dm/str command-translate "-label")}
command-translate]
[:span
[:span {:class (stl/css-case :command-name true
:not-customizable-label (not customizable?))
:id (dm/str command-translate "-label")}
command-translate]
(when (not customizable?)
[:span {:class (stl/css :not-customizable-label)} "(not customizable)"])]
[:div {:class (stl/css :shortcut-actions)
:aria-labelledby (dm/str command-translate "-label")}
(if (and customized? (str/blank? content))

View File

@ -77,6 +77,10 @@
text-align: start;
}
.not-customizable-label {
padding-inline-start: px2rem(6);
}
// Editable rows
.shortcuts-name-editable {