mirror of
https://github.com/penpot/penpot.git
synced 2026-08-26 06:39:12 +00:00
🐛 Fix paste as non customizable shortcut
This commit is contained in:
parent
bbbf5a534c
commit
f1dac45145
@ -110,6 +110,7 @@
|
|||||||
:command (ds/c-mod "v")
|
:command (ds/c-mod "v")
|
||||||
:subsections [:edit]
|
:subsections [:edit]
|
||||||
:section [:workspace]
|
:section [:workspace]
|
||||||
|
:customizable false
|
||||||
:fn (constantly nil)}
|
:fn (constantly nil)}
|
||||||
|
|
||||||
:paste-replace {:tooltip (ds/meta (ds/shift "V"))
|
:paste-replace {:tooltip (ds/meta (ds/shift "V"))
|
||||||
|
|||||||
@ -393,6 +393,7 @@
|
|||||||
customized? (and (contains? group-map shortcut-key)
|
customized? (and (contains? group-map shortcut-key)
|
||||||
(not (str/blank? (get group-map shortcut-key))))]
|
(not (str/blank? (get group-map shortcut-key))))]
|
||||||
(and customized?
|
(and customized?
|
||||||
|
(not (false? (:customizable shortcut)))
|
||||||
(or (str/blank? search-term)
|
(or (str/blank? search-term)
|
||||||
(matches-search (:translation shortcut) search-term))))))
|
(matches-search (:translation shortcut) search-term))))))
|
||||||
|
|
||||||
@ -406,6 +407,7 @@
|
|||||||
in-group? (contains? group-map shortcut-key)
|
in-group? (contains? group-map shortcut-key)
|
||||||
blank? (str/blank? (get group-map shortcut-key))]
|
blank? (str/blank? (get group-map shortcut-key))]
|
||||||
(and in-group? blank?
|
(and in-group? blank?
|
||||||
|
(not (false? (:customizable shortcut)))
|
||||||
(or (str/blank? search-term)
|
(or (str/blank? search-term)
|
||||||
(matches-search (:translation shortcut) search-term))))))
|
(matches-search (:translation shortcut) search-term))))))
|
||||||
|
|
||||||
|
|||||||
@ -612,8 +612,9 @@
|
|||||||
(get custom-shortcuts section-key))
|
(get custom-shortcuts section-key))
|
||||||
group-map (if (map? group-map) group-map {})
|
group-map (if (map? group-map) group-map {})
|
||||||
customized? (contains? group-map command)
|
customized? (contains? group-map command)
|
||||||
has-conflict? (contains? conflicts command)]
|
has-conflict? (contains? conflicts command)
|
||||||
(if editable?
|
customizable? (not (false? (:customizable command-info)))]
|
||||||
|
(if (and editable? customizable?)
|
||||||
[:> shortcut-row-editable* {:elements elements
|
[:> shortcut-row-editable* {:elements elements
|
||||||
:custom-shortcuts custom-shortcuts
|
:custom-shortcuts custom-shortcuts
|
||||||
:section-key section-key
|
:section-key section-key
|
||||||
@ -626,9 +627,13 @@
|
|||||||
:data-conflict (str has-conflict?)
|
:data-conflict (str has-conflict?)
|
||||||
:aria-label command-translate
|
:aria-label command-translate
|
||||||
:key command-translate}
|
:key command-translate}
|
||||||
[:span {:class (stl/css :command-name)
|
[:span
|
||||||
:id (dm/str command-translate "-label")}
|
[:span {:class (stl/css-case :command-name true
|
||||||
command-translate]
|
: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)
|
[:div {:class (stl/css :shortcut-actions)
|
||||||
:aria-labelledby (dm/str command-translate "-label")}
|
:aria-labelledby (dm/str command-translate "-label")}
|
||||||
(if (and customized? (str/blank? content))
|
(if (and customized? (str/blank? content))
|
||||||
|
|||||||
@ -77,6 +77,10 @@
|
|||||||
text-align: start;
|
text-align: start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.not-customizable-label {
|
||||||
|
padding-inline-start: px2rem(6);
|
||||||
|
}
|
||||||
|
|
||||||
// Editable rows
|
// Editable rows
|
||||||
|
|
||||||
.shortcuts-name-editable {
|
.shortcuts-name-editable {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user