mirror of
https://github.com/penpot/penpot.git
synced 2025-05-11 05:36:38 +02:00
🐛 Fix problem with readonly and inspect
This commit is contained in:
parent
05d6d2fcd4
commit
8c501db2fa
4 changed files with 25 additions and 11 deletions
|
@ -12,7 +12,7 @@
|
||||||
tab [Taiga #10377](https://tree.taiga.io/project/penpot/issue/10377)
|
tab [Taiga #10377](https://tree.taiga.io/project/penpot/issue/10377)
|
||||||
- Fix minor inconsistencies on RPC `get-file-libraries` and `get-file`
|
- Fix minor inconsistencies on RPC `get-file-libraries` and `get-file`
|
||||||
methods (add missing team-id prop)
|
methods (add missing team-id prop)
|
||||||
|
- Fix problem with viewer role and inspect mode [Taiga #9751](https://tree.taiga.io/project/penpot/issue/9751)
|
||||||
|
|
||||||
## 2.5.3
|
## 2.5.3
|
||||||
|
|
||||||
|
|
|
@ -197,16 +197,25 @@
|
||||||
:id "inspect"
|
:id "inspect"
|
||||||
:content inspect-content}])]
|
:content inspect-content}])]
|
||||||
|
|
||||||
(mf/with-effect [permissions]
|
|
||||||
(when-not (:can-edit permissions)
|
|
||||||
(on-change-tab :inspect)))
|
|
||||||
|
|
||||||
[:div {:class (stl/css :tool-window)}
|
[:div {:class (stl/css :tool-window)}
|
||||||
[:> tab-switcher* {:tabs tabs
|
(if (:can-edit permissions)
|
||||||
:default-selected "info"
|
[:> tab-switcher* {:tabs tabs
|
||||||
:on-change-tab on-change-tab
|
:default-selected "info"
|
||||||
:selected (name options-mode)
|
:on-change-tab on-change-tab
|
||||||
:class (stl/css :options-tab-switcher)}]]))
|
:selected (name options-mode)
|
||||||
|
:class (stl/css :options-tab-switcher)}]
|
||||||
|
|
||||||
|
[:div {:class (stl/css-case :element-options true
|
||||||
|
:inspect-options true
|
||||||
|
:read-only true)}
|
||||||
|
[:& hrs/right-sidebar {:page-id page-id
|
||||||
|
:objects objects
|
||||||
|
:file-id file-id
|
||||||
|
:frame shape-parent-frame
|
||||||
|
:shapes selected-shapes
|
||||||
|
:on-change-section on-change-section
|
||||||
|
:on-expand on-expand
|
||||||
|
:from :workspace}]])]))
|
||||||
|
|
||||||
;; TODO: this need optimizations, selected-objects and
|
;; TODO: this need optimizations, selected-objects and
|
||||||
;; selected-objects-with-children are derefed always but they only
|
;; selected-objects-with-children are derefed always but they only
|
||||||
|
|
|
@ -33,6 +33,11 @@
|
||||||
padding-top: $s-8;
|
padding-top: $s-8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.read-only {
|
||||||
|
grid-template-areas: "right-sidebar";
|
||||||
|
padding: var(--sp-s);
|
||||||
|
}
|
||||||
|
|
||||||
.design-options,
|
.design-options,
|
||||||
.interaction-options {
|
.interaction-options {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
|
|
@ -231,7 +231,7 @@
|
||||||
show-selrect? (and selrect (empty? drawing) (not text-editing?))
|
show-selrect? (and selrect (empty? drawing) (not text-editing?))
|
||||||
show-measures? (and (not transform)
|
show-measures? (and (not transform)
|
||||||
(not node-editing?)
|
(not node-editing?)
|
||||||
(or show-distances? mode-inspect?))
|
(or show-distances? mode-inspect? read-only?))
|
||||||
show-artboard-names? (contains? layout :display-artboard-names)
|
show-artboard-names? (contains? layout :display-artboard-names)
|
||||||
hide-ui? (contains? layout :hide-ui)
|
hide-ui? (contains? layout :hide-ui)
|
||||||
show-rulers? (and (contains? layout :rulers) (not hide-ui?))
|
show-rulers? (and (contains? layout :rulers) (not hide-ui?))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue