diff --git a/common/src/app/common/flags.cljc b/common/src/app/common/flags.cljc index 80f96fd8aa..49a71cd04e 100644 --- a/common/src/app/common/flags.cljc +++ b/common/src/app/common/flags.cljc @@ -10,6 +10,8 @@ [clojure.set :as set] [cuerdas.core :as str])) +(def ^:dynamic *current* #{}) + (def login "Flags related to login features" #{;; Allows registration with login / password diff --git a/frontend/src/app/config.cljs b/frontend/src/app/config.cljs index 11ff04b2d9..2077fb0dbc 100644 --- a/frontend/src/app/config.cljs +++ b/frontend/src/app/config.cljs @@ -104,6 +104,12 @@ (def plugins-whitelist (into #{} (obj/get global "penpotPluginsWhitelist" []))) (def templates-uri (obj/get global "penpotTemplatesUri" "https://penpot.github.io/penpot-files/")) + +;; We set the current parsed flags under common for make +;; it available for common code without the need to pass +;; the flags all arround on parameters. +(set! app.common.flags/*current* flags) + (defn- normalize-uri [uri-str] (let [uri (u/uri uri-str)]