mirror of
https://github.com/penpot/penpot.git
synced 2026-09-25 05:16:14 +00:00
🐛 Fix permissions for search and replace (#11713)
This commit is contained in:
parent
0487abb2d5
commit
a91aa0e37d
@ -283,6 +283,7 @@
|
|||||||
search-scope (:search-scope state)
|
search-scope (:search-scope state)
|
||||||
current-match-idx (:current-match-idx state)
|
current-match-idx (:current-match-idx state)
|
||||||
search-input-ref (mf/use-ref nil)
|
search-input-ref (mf/use-ref nil)
|
||||||
|
can-edit? (:can-edit (deref refs/permissions))
|
||||||
|
|
||||||
clear-search-text
|
clear-search-text
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
@ -583,11 +584,12 @@
|
|||||||
:aria-label (tr "workspace.sidebar.layers.filter")
|
:aria-label (tr "workspace.sidebar.layers.filter")
|
||||||
:on-click on-toggle-filters-click
|
:on-click on-toggle-filters-click
|
||||||
:icon i/filter}]]
|
:icon i/filter}]]
|
||||||
[:> icon-button* {:variant "ghost"
|
(when can-edit?
|
||||||
:aria-pressed find-replace-mode?
|
[:> icon-button* {:variant "ghost"
|
||||||
:aria-label (tr "workspace.sidebar.layers.search-and-replace")
|
:aria-pressed find-replace-mode?
|
||||||
:on-click toggle-mode
|
:aria-label (tr "workspace.sidebar.layers.search-and-replace")
|
||||||
:icon i/menu}]
|
:on-click toggle-mode
|
||||||
|
:icon i/menu}])
|
||||||
[:> icon-button* {:variant "ghost"
|
[:> icon-button* {:variant "ghost"
|
||||||
:aria-label (tr "labels.close")
|
:aria-label (tr "labels.close")
|
||||||
:on-click toggle-search
|
:on-click toggle-search
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user