mirror of
https://github.com/penpot/penpot.git
synced 2025-01-26 08:29:42 -05:00
🎉 Added a tag to mark read only mode
This commit is contained in:
parent
987b7f44f4
commit
2ab3ed9ab4
4 changed files with 34 additions and 12 deletions
|
@ -119,6 +119,17 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
& .view-only-mode {
|
||||||
|
color: $color-primary;
|
||||||
|
border: 1px solid $color-primary;
|
||||||
|
border-radius: 3px;
|
||||||
|
font-size: 10px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
padding: 0px 4px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
& .focus-title {
|
& .focus-title {
|
||||||
|
|
|
@ -540,6 +540,8 @@
|
||||||
observer-var (mf/use-var nil)
|
observer-var (mf/use-var nil)
|
||||||
lazy-load-ref (mf/use-ref 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)
|
[filtered-objects show-more filter-component] (use-search page objects)
|
||||||
|
|
||||||
intersection-callback
|
intersection-callback
|
||||||
|
@ -576,14 +578,17 @@
|
||||||
(dom/add-class! last-hidden-frame "sticky"))))]
|
(dom/add-class! last-hidden-frame "sticky"))))]
|
||||||
|
|
||||||
[:div#layers.tool-window
|
[:div#layers.tool-window
|
||||||
(if (d/not-empty? focus)
|
(if workspace-read-only?
|
||||||
[:div.tool-window-bar
|
[:div.tool-window-bar
|
||||||
[:div.focus-title {:on-click #(st/emit! (dw/toggle-focus-mode))}
|
[:span (:name page)]
|
||||||
[:button.back-button i/arrow-slide]
|
[:span.view-only-mode (tr "labels.view-only")]]
|
||||||
[:div.focus-name (or title (tr "workspace.focus.selection"))]
|
(if (d/not-empty? focus)
|
||||||
[:div.focus-mode (tr "workspace.focus.focus-mode")]]]
|
[:div.tool-window-bar
|
||||||
|
[:div.focus-title {:on-click #(st/emit! (dw/toggle-focus-mode))}
|
||||||
filter-component)
|
[: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)
|
(if (some? filtered-objects)
|
||||||
[:*
|
[:*
|
||||||
|
@ -599,8 +604,8 @@
|
||||||
:key (dm/str (:id page))
|
:key (dm/str (:id page))
|
||||||
:filtered? true}]]]
|
:filtered? true}]]]
|
||||||
|
|
||||||
[:div.tool-window-content {:on-scroll on-scroll
|
[:div.tool-window-content {:on-scroll on-scroll
|
||||||
:style {:display (when (some? filtered-objects) "none")}}
|
:style {:display (when (some? filtered-objects) "none")}}
|
||||||
[:& layers-tree {:objects objects
|
[:& layers-tree {:objects objects
|
||||||
:key (dm/str (:id page))
|
:key (dm/str (:id page))
|
||||||
:filtered? false}]])]))
|
:filtered? false}]])]))
|
||||||
|
|
|
@ -1549,6 +1549,9 @@ msgstr "Active"
|
||||||
msgid "labels.inactive"
|
msgid "labels.inactive"
|
||||||
msgstr "Inactive"
|
msgstr "Inactive"
|
||||||
|
|
||||||
|
msgid "labels.view-only"
|
||||||
|
msgstr "VIEW ONLY"
|
||||||
|
|
||||||
#: src/app/main/data/workspace/persistence.cljs, src/app/main/data/workspace/persistence.cljs, src/app/main/data/media.cljs
|
#: src/app/main/data/workspace/persistence.cljs, src/app/main/data/workspace/persistence.cljs, src/app/main/data/media.cljs
|
||||||
msgid "media.loading"
|
msgid "media.loading"
|
||||||
msgstr "Loading image…"
|
msgstr "Loading image…"
|
||||||
|
|
|
@ -1742,6 +1742,9 @@ msgstr "Activo"
|
||||||
msgid "labels.inactive"
|
msgid "labels.inactive"
|
||||||
msgstr "Inactivo"
|
msgstr "Inactivo"
|
||||||
|
|
||||||
|
msgid "labels.view-only"
|
||||||
|
msgstr "SOLO LECTURA"
|
||||||
|
|
||||||
#: src/app/main/data/workspace/persistence.cljs, src/app/main/data/media.cljs
|
#: src/app/main/data/workspace/persistence.cljs, src/app/main/data/media.cljs
|
||||||
msgid "media.loading"
|
msgid "media.loading"
|
||||||
msgstr "Cargando imagen…"
|
msgstr "Cargando imagen…"
|
||||||
|
|
Loading…
Add table
Reference in a new issue