mirror of
https://github.com/penpot/penpot.git
synced 2025-05-04 17:35:54 +02:00
🐛 Fix rename blocked boards (#5845)
This commit is contained in:
parent
8b6a9b373d
commit
6bb7fa26f4
4 changed files with 19 additions and 13 deletions
|
@ -65,6 +65,7 @@ is a number of cores)
|
||||||
- Fix problem opening url when page-id didn't exist [Taiga #10157](https://tree.taiga.io/project/penpot/issue/10157)
|
- Fix problem opening url when page-id didn't exist [Taiga #10157](https://tree.taiga.io/project/penpot/issue/10157)
|
||||||
- Fix problem with onboarding to a team [Taiga #10143](https://tree.taiga.io/project/penpot/issue/10143)
|
- Fix problem with onboarding to a team [Taiga #10143](https://tree.taiga.io/project/penpot/issue/10143)
|
||||||
- Fix problem with grid layout crashing [Taiga #10127](https://tree.taiga.io/project/penpot/issue/10127)
|
- Fix problem with grid layout crashing [Taiga #10127](https://tree.taiga.io/project/penpot/issue/10127)
|
||||||
|
- Fix rename locked boards [Taiga #10174](https://tree.taiga.io/project/penpot/issue/10174)
|
||||||
|
|
||||||
## 2.4.3
|
## 2.4.3
|
||||||
|
|
||||||
|
|
|
@ -120,16 +120,17 @@
|
||||||
[:& layer-name {:ref name-ref
|
[:& layer-name {:ref name-ref
|
||||||
:shape-id id
|
:shape-id id
|
||||||
:shape-name name
|
:shape-name name
|
||||||
:shape-touched? touched?
|
:is-shape-touched touched?
|
||||||
:disabled-double-click read-only?
|
:disabled-double-click read-only?
|
||||||
:on-start-edit on-disable-drag
|
:on-start-edit on-disable-drag
|
||||||
:on-stop-edit on-enable-drag
|
:on-stop-edit on-enable-drag
|
||||||
:depth depth
|
:depth depth
|
||||||
|
:is-blocked blocked?
|
||||||
:parent-size parent-size
|
:parent-size parent-size
|
||||||
:selected? selected?
|
:is-selected selected?
|
||||||
:type-comp component-tree?
|
:type-comp component-tree?
|
||||||
:type-frame (cfh/frame-shape? item)
|
:type-frame (cfh/frame-shape? item)
|
||||||
:hidden? hidden?}]
|
:is-hidden hidden?}]
|
||||||
|
|
||||||
(when (not read-only?)
|
(when (not read-only?)
|
||||||
[:div {:class (stl/css-case
|
[:div {:class (stl/css-case
|
||||||
|
|
|
@ -27,9 +27,9 @@
|
||||||
(mf/defc layer-name
|
(mf/defc layer-name
|
||||||
{::mf/wrap-props false
|
{::mf/wrap-props false
|
||||||
::mf/forward-ref true}
|
::mf/forward-ref true}
|
||||||
[{:keys [shape-id shape-name shape-touched? disabled-double-click
|
[{:keys [shape-id shape-name is-shape-touched disabled-double-click
|
||||||
on-start-edit on-stop-edit depth parent-size selected?
|
on-start-edit on-stop-edit depth parent-size is-selected
|
||||||
type-comp type-frame hidden?]} external-ref]
|
type-comp type-frame is-hidden is-blocked]} external-ref]
|
||||||
(let [edition* (mf/use-state false)
|
(let [edition* (mf/use-state false)
|
||||||
edition? (deref edition*)
|
edition? (deref edition*)
|
||||||
|
|
||||||
|
@ -42,9 +42,10 @@
|
||||||
|
|
||||||
start-edit
|
start-edit
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
(mf/deps disabled-double-click on-start-edit shape-id)
|
(mf/deps disabled-double-click on-start-edit shape-id is-blocked)
|
||||||
(fn []
|
(fn []
|
||||||
(when (not disabled-double-click)
|
(when (and (not is-blocked)
|
||||||
|
(not disabled-double-click))
|
||||||
(on-start-edit)
|
(on-start-edit)
|
||||||
(reset! edition* true)
|
(reset! edition* true)
|
||||||
(st/emit! (dw/start-rename-shape shape-id)))))
|
(st/emit! (dw/start-rename-shape shape-id)))))
|
||||||
|
@ -102,8 +103,8 @@
|
||||||
{:class (stl/css-case
|
{:class (stl/css-case
|
||||||
:element-name true
|
:element-name true
|
||||||
:left-ellipsis has-path?
|
:left-ellipsis has-path?
|
||||||
:selected selected?
|
:selected is-selected
|
||||||
:hidden hidden?
|
:hidden is-hidden
|
||||||
:type-comp type-comp
|
:type-comp type-comp
|
||||||
:type-frame type-frame)
|
:type-frame type-frame)
|
||||||
:style {"--depth" depth "--parent-size" parent-size}
|
:style {"--depth" depth "--parent-size" parent-size}
|
||||||
|
@ -112,5 +113,5 @@
|
||||||
(if (dbg/enabled? :show-ids)
|
(if (dbg/enabled? :show-ids)
|
||||||
(str (d/nilv shape-name "") " | " (str/slice (str shape-id) 24))
|
(str (d/nilv shape-name "") " | " (str/slice (str shape-id) 24))
|
||||||
(d/nilv shape-name ""))]
|
(d/nilv shape-name ""))]
|
||||||
(when (and (dbg/enabled? :show-touched) ^boolean shape-touched?)
|
(when (and (dbg/enabled? :show-touched) ^boolean is-shape-touched)
|
||||||
[:span {:class (stl/css :element-name-touched)} "*"])])))
|
[:span {:class (stl/css :element-name-touched)} "*"])])))
|
||||||
|
|
|
@ -96,6 +96,8 @@
|
||||||
"var(--color-accent-tertiary)")
|
"var(--color-accent-tertiary)")
|
||||||
"#8f9da3") ;; TODO: Set this color on the DS
|
"#8f9da3") ;; TODO: Set this color on the DS
|
||||||
|
|
||||||
|
blocked? (:blocked frame)
|
||||||
|
|
||||||
on-pointer-down
|
on-pointer-down
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
(mf/deps (:id frame) on-frame-select workspace-read-only?)
|
(mf/deps (:id frame) on-frame-select workspace-read-only?)
|
||||||
|
@ -145,9 +147,10 @@
|
||||||
|
|
||||||
start-edit
|
start-edit
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
(mf/deps frame-id edition?)
|
(mf/deps frame-id edition? blocked? workspace-read-only?)
|
||||||
(fn []
|
(fn []
|
||||||
(when-not (-> @st/state :workspace-global :read-only?)
|
(when (and (not blocked?)
|
||||||
|
(not workspace-read-only?))
|
||||||
(if (not edition?)
|
(if (not edition?)
|
||||||
(reset! edition* true)
|
(reset! edition* true)
|
||||||
(st/emit! (dw/start-rename-shape frame-id))))))
|
(st/emit! (dw/start-rename-shape frame-id))))))
|
||||||
|
|
Loading…
Add table
Reference in a new issue