diff --git a/frontend/src/app/config.cljs b/frontend/src/app/config.cljs index 72bbb4d00..e6b4361b0 100644 --- a/frontend/src/app/config.cljs +++ b/frontend/src/app/config.cljs @@ -111,6 +111,7 @@ (def flex-help-uri (obj/get global "penpotGridHelpURI" "https://help.penpot.app/user-guide/flexible-layouts/")) (def grid-help-uri (obj/get global "penpotGridHelpURI" "https://help.penpot.app/user-guide/flexible-layouts/")) (def plugins-list-uri (obj/get global "penpotPluginsListUri" "https://penpot-docs-plugins.pages.dev/plugins/getting-started/#examples")) +(def plugins-whitelist (into #{} (obj/get global "penpotPluginsWhitelist" []))) (defn- normalize-uri [uri-str] diff --git a/frontend/src/app/main/ui/workspace/plugins.cljs b/frontend/src/app/main/ui/workspace/plugins.cljs index cecc22bf6..3beba2d16 100644 --- a/frontend/src/app/main/ui/workspace/plugins.cljs +++ b/frontend/src/app/main/ui/workspace/plugins.cljs @@ -9,7 +9,7 @@ (:require [app.common.data :as d] [app.common.data.macros :as dm] - [app.config :as cf] + [app.config :as cfg] [app.main.data.events :as ev] [app.main.data.modal :as modal] [app.main.data.plugins :as dp] @@ -169,7 +169,7 @@ [:> i18n/tr-html* {:class (stl/css :discover) :on-click #(st/emit! (ptk/event ::ev/event {::ev/name "open-plugins-list"})) - :content (tr "workspace.plugins.discover" cf/plugins-list-uri)}]) + :content (tr "workspace.plugins.discover" cfg/plugins-list-uri)}]) [:hr] @@ -178,7 +178,7 @@ [:div {:class (stl/css :plugins-empty-logo)} i/puzzle] [:div {:class (stl/css :plugins-empty-text)} (tr "workspace.plugins.empty-plugins")] [:a {:class (stl/css :plugins-link) - :href cf/plugins-list-uri + :href cfg/plugins-list-uri :target "_blank" :on-click #(st/emit! (ptk/event ::ev/event {::ev/name "open-plugins-list"}))} (tr "workspace.plugins.plugin-list-link") i/external-link]] @@ -287,8 +287,9 @@ [:div {:class (stl/css :modal-content)} [:& plugins-permission-list {:permissions permissions}] - [:div {:class (stl/css :permissions-disclaimer)} - (tr "workspace.plugins.permissions.disclaimer")]] + (when-not (contains? cfg/plugins-whitelist host) + [:div {:class (stl/css :permissions-disclaimer)} + (tr "workspace.plugins.permissions.disclaimer")])] [:div {:class (stl/css :modal-footer)} [:div {:class (stl/css :action-buttons)} diff --git a/frontend/src/app/main/ui/workspace/plugins.scss b/frontend/src/app/main/ui/workspace/plugins.scss index ba736acf8..643b4957a 100644 --- a/frontend/src/app/main/ui/workspace/plugins.scss +++ b/frontend/src/app/main/ui/workspace/plugins.scss @@ -272,7 +272,7 @@ div.input-error { @include bodySmallTypography; padding: $s-16; background: var(--color-background-quaternary); - color: var(--color-foreground-quaternary); + color: var(--color-foreground-primary); border-radius: $br-4; }