mirror of
https://github.com/penpot/penpot.git
synced 2025-01-21 06:02:32 -05:00
♻️ Resolve minor errors on viewer role on dashboard
This commit is contained in:
parent
6fb65de100
commit
536c25c206
8 changed files with 27 additions and 42 deletions
|
@ -222,7 +222,7 @@
|
|||
::webhooks/event? true}
|
||||
[{:keys [::db/pool] :as cfg} {:keys [::rpc/profile-id id team-id is-pinned] :as params}]
|
||||
(db/with-atomic [conn pool]
|
||||
(check-edition-permissions! conn profile-id id)
|
||||
(check-read-permissions! conn profile-id id)
|
||||
(db/exec-one! conn [sql:update-project-pin team-id id profile-id is-pinned is-pinned])
|
||||
nil))
|
||||
|
||||
|
|
|
@ -152,7 +152,7 @@
|
|||
(t/is (th/ex-info? error))
|
||||
(t/is (th/ex-of-type? error :not-found))))
|
||||
|
||||
(t/deftest permissions-checks-delete-project
|
||||
(t/deftest permissions-checks-pin-project
|
||||
(let [profile1 (th/create-profile* 1)
|
||||
profile2 (th/create-profile* 2)
|
||||
project (th/create-project* 1 {:team-id (:default-team-id profile1)
|
||||
|
|
|
@ -284,8 +284,4 @@
|
|||
(watch [_ state _]
|
||||
(when (contains? (:workspace-libraries state) file-id)
|
||||
(rx/of (dwl/ext-library-changed file-id modified-at revn changes)
|
||||
(dwl/notify-sync-file file-id))))))
|
||||
|
||||
|
||||
|
||||
|
||||
(dwl/notify-sync-file file-id))))))
|
|
@ -361,7 +361,8 @@
|
|||
|
||||
[:div {:class (stl/css :table-field :variants)}
|
||||
(for [{:keys [id] :as item} variants]
|
||||
[:div {:class (stl/css :variant)
|
||||
[:div {:class (stl/css-case :variant true
|
||||
:inhert-variant you-viewer?)
|
||||
:key (dm/str id)}
|
||||
[:span {:class (stl/css :label)}
|
||||
[:& font-variant-display-name {:variant item}]]
|
||||
|
@ -384,16 +385,17 @@
|
|||
:on-click on-cancel}
|
||||
i/close]]
|
||||
|
||||
(when-not you-viewer? [:div {:class (stl/css :table-field :options)}
|
||||
[:span {:class (stl/css :icon)
|
||||
:on-click on-menu-open}
|
||||
i/menu]
|
||||
(when-not you-viewer?
|
||||
[:div {:class (stl/css :table-field :options)}
|
||||
[:span {:class (stl/css :icon)
|
||||
:on-click on-menu-open}
|
||||
i/menu]
|
||||
|
||||
[:& installed-font-context-menu
|
||||
{:on-close on-menu-close
|
||||
:is-open menu-open?
|
||||
:on-delete on-delete-font
|
||||
:on-edit on-edit}]]))]))
|
||||
[:& installed-font-context-menu
|
||||
{:on-close on-menu-close
|
||||
:is-open menu-open?
|
||||
:on-delete on-delete-font
|
||||
:on-edit on-edit}]]))]))
|
||||
|
||||
(mf/defc installed-fonts
|
||||
[{:keys [fonts you-viewer?] :as props}]
|
||||
|
|
|
@ -157,6 +157,9 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
.inhert-variant {
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
|
||||
.table-field {
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
:subtitle (when you-viewer? (tr "dashboard.empty-placeholder-libraries-subtitle-viewer-role"))
|
||||
:class (stl/css :empty-placeholder-libraries)}
|
||||
(when-not you-viewer?
|
||||
[:> i18n/tr-html* {:content (tr "dashboard.empty-placeholder-drafts")
|
||||
[:> i18n/tr-html* {:content (tr "dashboard.empty-placeholder-libraries")
|
||||
:class (stl/css :placeholder-markdown)
|
||||
:tag-name "span"}])]
|
||||
|
||||
|
|
|
@ -434,18 +434,11 @@ msgstr "Duplicate %s files"
|
|||
|
||||
#: src/app/main/ui/dashboard/placeholder.cljs:33
|
||||
#, markdown
|
||||
msgid "dashboard.empty-placeholder-drafts"
|
||||
msgid "dashboard.empty-placeholder-libraries"
|
||||
msgstr ""
|
||||
"Files added to Libraries will appear here. Try sharing your files or add "
|
||||
"Libraries added to the project will appear here. Try sharing your files or add "
|
||||
"from our [Libraries & templates](https://penpot.app/libraries-templates)."
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#: src/app/main/ui/dashboard/placeholder.cljs
|
||||
msgid "dashboard.empty-placeholder-libraries-title"
|
||||
msgstr "No libraries yet."
|
||||
|
@ -454,12 +447,12 @@ msgstr "No libraries yet."
|
|||
#, markdown
|
||||
msgid "dashboard.empty-placeholder-libraries-subtitle"
|
||||
msgstr ""
|
||||
"Files added to Libraries will appear here. Try sharing your files or add "
|
||||
"Libraries added to the project will appear here. Try sharing your files or add "
|
||||
"from our [Libraries & templates](https://penpot.app/libraries-templates)."
|
||||
|
||||
#: src/app/main/ui/dashboard/placeholder.cljs
|
||||
msgid "dashboard.empty-placeholder-libraries-subtitle-viewer-role"
|
||||
msgstr "Files added to Libraries will appear here."
|
||||
msgstr "Libraries added to the project will appear here."
|
||||
|
||||
#: src/app/main/ui/dashboard
|
||||
msgid "dashboard.empty-placeholder-drafts-title"
|
||||
|
|
|
@ -436,20 +436,12 @@ msgstr "Duplicar %s archivos"
|
|||
|
||||
#: src/app/main/ui/dashboard/placeholder.cljs:33
|
||||
#, markdown
|
||||
msgid "dashboard.empty-placeholder-drafts"
|
||||
msgid "dashboard.empty-placeholder-libraries"
|
||||
msgstr ""
|
||||
"Los archivos agregados a las bibliotecas aparecerán aquí. Si quieres probar "
|
||||
"Las bibliotecas añadidas al proyecto aparecerán aquí. Si quieres probar "
|
||||
"con alguna plantilla ve a [Bibliotecas y "
|
||||
"plantillas](https://penpot.app/libraries-templates)."
|
||||
|
||||
#: src/app/main/ui/dashboard/placeholder.cljs:33
|
||||
msgid "dashboard.empty-placeholder-drafts-viewer-role"
|
||||
msgstr ""
|
||||
"Los archivos agregados a las bibliotecas aparecerán aquí."
|
||||
|
||||
|
||||
|
||||
|
||||
#: src/app/main/ui/dashboard/placeholder.cljs
|
||||
msgid "dashboard.empty-placeholder-libraries-title"
|
||||
msgstr "Aún no existen librerías compartidas."
|
||||
|
@ -458,14 +450,13 @@ msgstr "Aún no existen librerías compartidas."
|
|||
#, markdown
|
||||
msgid "dashboard.empty-placeholder-libraries-subtitle"
|
||||
msgstr ""
|
||||
"Los archivos agregados a las bibliotecas aparecerán aquí. Si quieres probar "
|
||||
"Las bibliotecas añadidas al proyecto aparecerán aquí. Si quieres probar "
|
||||
"con alguna plantilla ve a [Bibliotecas y "
|
||||
"plantillas](https://penpot.app/libraries-templates)."
|
||||
|
||||
#: src/app/main/ui/dashboard/placeholder.cljs
|
||||
msgid "dashboard.empty-placeholder-libraries-subtitle-viewer-role"
|
||||
msgstr "Los archivos agregados a las bibliotecas aparecerán aquí."
|
||||
|
||||
msgstr "Las bibliotecas añadidas al proyecto aparecerán aquí."
|
||||
|
||||
#: src/app/main/ui/dashboard/files.cljs
|
||||
msgid "dashboard.empty-placeholder-drafts-title"
|
||||
|
|
Loading…
Add table
Reference in a new issue