mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 10:38:13 -05:00
🎉 Added a tag to mark read only mode (now on pages)
This commit is contained in:
parent
3a8486f4b0
commit
a54f5484e8
3 changed files with 11 additions and 14 deletions
|
@ -126,9 +126,11 @@
|
|||
border-radius: 3px;
|
||||
font-size: 10px;
|
||||
text-transform: uppercase;
|
||||
padding: 0px 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-left: auto;
|
||||
padding: 0.25rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -540,8 +540,6 @@
|
|||
observer-var (mf/use-var nil)
|
||||
lazy-load-ref (mf/use-ref nil)
|
||||
|
||||
workspace-read-only? (mf/use-ctx ctx/workspace-read-only?)
|
||||
|
||||
[filtered-objects show-more filter-component] (use-search page objects)
|
||||
|
||||
intersection-callback
|
||||
|
@ -578,17 +576,13 @@
|
|||
(dom/add-class! last-hidden-frame "sticky"))))]
|
||||
|
||||
[:div#layers.tool-window
|
||||
(if workspace-read-only?
|
||||
(if (d/not-empty? focus)
|
||||
[:div.tool-window-bar
|
||||
[:span (:name page)]
|
||||
[:span.view-only-mode (tr "labels.view-only")]]
|
||||
(if (d/not-empty? focus)
|
||||
[:div.tool-window-bar
|
||||
[:div.focus-title {:on-click #(st/emit! (dw/toggle-focus-mode))}
|
||||
[:button.back-button i/arrow-slide]
|
||||
[:div.focus-name (or title (tr "workspace.focus.selection"))]
|
||||
[:div.focus-mode (tr "workspace.focus.focus-mode")]]]
|
||||
filter-component))
|
||||
[:div.focus-title {:on-click #(st/emit! (dw/toggle-focus-mode))}
|
||||
[:button.back-button i/arrow-slide]
|
||||
[:div.focus-name (or title (tr "workspace.focus.selection"))]
|
||||
[:div.focus-mode (tr "workspace.focus.focus-mode")]]]
|
||||
filter-component)
|
||||
|
||||
(if (some? filtered-objects)
|
||||
[:*
|
||||
|
|
|
@ -222,7 +222,8 @@
|
|||
:style #js {"--height" (str size "px")}}
|
||||
[:div.tool-window-bar
|
||||
[:span (tr "workspace.sidebar.sitemap")]
|
||||
(when-not workspace-read-only?
|
||||
(if workspace-read-only?
|
||||
[:div.view-only-mode (tr "labels.view-only")]
|
||||
[:div.add-page {:on-click create} i/close])
|
||||
[:div.collapse-pages {:on-click toggle-pages
|
||||
:style {:transform (when (not @show-pages?) "rotate(-90deg)")}} i/arrow-slide]]
|
||||
|
|
Loading…
Add table
Reference in a new issue