From e18b4666ba56fc4a0c8051fb4a526d82f4a6a65e Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Tue, 24 Sep 2024 15:20:57 +0200 Subject: [PATCH] :sparkles: Update permissions dialog --- .../src/app/main/ui/workspace/plugins.cljs | 22 ++++++++++++++++++- .../src/app/main/ui/workspace/plugins.scss | 5 +++-- frontend/translations/en.po | 11 +++++++++- frontend/translations/es.po | 11 +++++++++- 4 files changed, 44 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/plugins.cljs b/frontend/src/app/main/ui/workspace/plugins.cljs index 424b9bf9d..bc6346b59 100644 --- a/frontend/src/app/main/ui/workspace/plugins.cljs +++ b/frontend/src/app/main/ui/workspace/plugins.cljs @@ -277,7 +277,27 @@ [:div {:class (stl/css :permissions-list-entry)} i/oauth-3 [:p {:class (stl/css :permissions-list-text)} - (tr "workspace.plugins.permissions.library-read")]])] + (tr "workspace.plugins.permissions.library-read")]]) + + (cond + (contains? permissions "comment:write") + [:div {:class (stl/css :permissions-list-entry)} + i/oauth-1 + [:p {:class (stl/css :permissions-list-text)} + (tr "workspace.plugins.permissions.comment-write")]] + + (contains? permissions "comment:read") + [:div {:class (stl/css :permissions-list-entry)} + i/oauth-1 + [:p {:class (stl/css :permissions-list-text)} + (tr "workspace.plugins.permissions.comment-read")]]) + + (cond + (contains? permissions "allow:download") + [:div {:class (stl/css :permissions-list-entry)} + i/oauth-1 + [:p {:class (stl/css :permissions-list-text)} + (tr "workspace.plugins.permissions.allow-download")]])] [:div {:class (stl/css :permissions-disclaimer)} (tr "workspace.plugins.permissions.disclaimer")]] diff --git a/frontend/src/app/main/ui/workspace/plugins.scss b/frontend/src/app/main/ui/workspace/plugins.scss index 6dd52c739..2276601a4 100644 --- a/frontend/src/app/main/ui/workspace/plugins.scss +++ b/frontend/src/app/main/ui/workspace/plugins.scss @@ -14,6 +14,7 @@ @extend .modal-container-base; display: grid; grid-template-rows: auto 1fr auto; + max-height: initial; &.plugin-permissions { width: $s-412; @@ -253,8 +254,8 @@ div.input-error { .permissions-disclaimer { @include bodySmallTypography; padding: $s-16; - background: var(--color-background-tertiary); - color: var(--color-foreground-secondary); + background: var(--color-background-quaternary); + color: var(--color-foreground-quaternary); border-radius: $br-4; } diff --git a/frontend/translations/en.po b/frontend/translations/en.po index bf92cfde7..15211ffb5 100644 --- a/frontend/translations/en.po +++ b/frontend/translations/en.po @@ -5580,7 +5580,7 @@ msgstr "Read and modify the content of files that users have access to." #: src/app/main/ui/workspace/plugins.cljs:274 msgid "workspace.plugins.permissions.disclaimer" -msgstr "Note that this plugin has been created by an external party." +msgstr "Please note that this plugin is created by an external party, so ensure you trust it before granting access. Your data privacy and security are important to us. If you have any concerns, please contact support." #: src/app/main/ui/workspace/plugins.cljs:271 msgid "workspace.plugins.permissions.library-read" @@ -5590,6 +5590,15 @@ msgstr "Read your libraries and assets." msgid "workspace.plugins.permissions.library-write" msgstr "Read and modify your libraries and assets." +msgid "workspace.plugins.permissions.comment-read" +msgstr "Read your comments and replies." + +msgid "workspace.plugins.permissions.comment-write" +msgstr "Read and modify your comments and reply in your name." + +msgid "workspace.plugins.permissions.allow-download" +msgstr "Start file downloads." + #: src/app/main/ui/workspace/plugins.cljs:236 msgid "workspace.plugins.permissions.title" msgstr "THIS PLUGIN WANTS ACCESS TO:" diff --git a/frontend/translations/es.po b/frontend/translations/es.po index 947553075..6ba3d8668 100644 --- a/frontend/translations/es.po +++ b/frontend/translations/es.po @@ -5567,7 +5567,7 @@ msgstr "Leer y modificar el contenido de sus archivos." #: src/app/main/ui/workspace/plugins.cljs:274 msgid "workspace.plugins.permissions.disclaimer" -msgstr "Tenga en cuenta que esta extensión ha sido desarrollada por terceros." +msgstr "Tenga en cuenta que las extensiones están desarrolladas por terceros, asegursé que confía antes de conceder el permiso. Su privacidad y seguridad es importante para nosotros. Si tiene cualquier duda, contacte soporte." #: src/app/main/ui/workspace/plugins.cljs:271 msgid "workspace.plugins.permissions.library-read" @@ -5577,6 +5577,15 @@ msgstr "Leer la información de sus bibliotecas y recursos." msgid "workspace.plugins.permissions.library-write" msgstr "Leer y modificar la información de sus bibliotecas y recursos." +msgid "workspace.plugins.permissions.comment-read" +msgstr "Leer tus comentarios y respuestas." + +msgid "workspace.plugins.permissions.comment-write" +msgstr "Leer y modificar tus comentarios y responder en tu nombre." + +msgid "workspace.plugins.permissions.allow-download" +msgstr "Comenzar descargas de ficheros." + #: src/app/main/ui/workspace/plugins.cljs:236 msgid "workspace.plugins.permissions.title" msgstr "LA EXTENSIÓN SOLICITA PERMISO PARA ACCEDER:"