0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 23:49:45 -05:00

🎉 Added a tag to mark read only mode

This commit is contained in:
Pablo Alba 2023-01-11 12:04:25 +01:00
parent 987b7f44f4
commit 2ab3ed9ab4
4 changed files with 34 additions and 12 deletions

View file

@ -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 {

View file

@ -540,6 +540,8 @@
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
@ -576,14 +578,17 @@
(dom/add-class! last-hidden-frame "sticky"))))]
[:div#layers.tool-window
(if (d/not-empty? focus)
(if workspace-read-only?
[: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)
[: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))
(if (some? filtered-objects)
[:*
@ -599,8 +604,8 @@
:key (dm/str (:id page))
:filtered? true}]]]
[:div.tool-window-content {:on-scroll on-scroll
:style {:display (when (some? filtered-objects) "none")}}
[:& layers-tree {:objects objects
:key (dm/str (:id page))
:filtered? false}]])]))
[:div.tool-window-content {:on-scroll on-scroll
:style {:display (when (some? filtered-objects) "none")}}
[:& layers-tree {:objects objects
:key (dm/str (:id page))
:filtered? false}]])]))

View file

@ -1549,6 +1549,9 @@ msgstr "Active"
msgid "labels.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
msgid "media.loading"
msgstr "Loading image…"

View file

@ -1742,6 +1742,9 @@ msgstr "Activo"
msgid "labels.inactive"
msgstr "Inactivo"
msgid "labels.view-only"
msgstr "SOLO LECTURA"
#: src/app/main/data/workspace/persistence.cljs, src/app/main/data/media.cljs
msgid "media.loading"
msgstr "Cargando imagen…"