mirror of
https://github.com/penpot/penpot.git
synced 2025-05-19 02:06:11 +02:00
🐛 Fix allow change team image for editor role users
This commit is contained in:
parent
fa4c7a1eb7
commit
f05f527336
3 changed files with 36 additions and 15 deletions
|
@ -900,6 +900,10 @@
|
|||
|
||||
stats (mf/deref refs/dashboard-team-stats)
|
||||
|
||||
you-owner? (get-in team [:permissions :is-owner])
|
||||
you-admin? (get-in team [:permissions :is-admin])
|
||||
can-edit? (or you-owner? you-admin?)
|
||||
|
||||
on-image-click
|
||||
(mf/use-callback #(dom/click (mf/ref-val finput)))
|
||||
|
||||
|
@ -931,12 +935,14 @@
|
|||
[:div.label (tr "dashboard.team-info")]
|
||||
[:div.name (:name team)]
|
||||
[:div.icon
|
||||
[:span.update-overlay {:on-click on-image-click} i/image]
|
||||
(when can-edit?
|
||||
[:span.update-overlay {:on-click on-image-click} i/image])
|
||||
[:img {:src (cfg/resolve-team-photo-url team)}]
|
||||
[:& file-uploader {:accept "image/jpeg,image/png"
|
||||
:multi false
|
||||
:ref finput
|
||||
:on-selected on-file-selected}]]]
|
||||
(when can-edit?
|
||||
[:& file-uploader {:accept "image/jpeg,image/png"
|
||||
:multi false
|
||||
:ref finput
|
||||
:on-selected on-file-selected}])]]
|
||||
|
||||
[:div.block.owner-block
|
||||
[:div.label (tr "dashboard.team-members")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue