From 16fba499379f6d07170b64f7019cf3caf7133c6c Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 9 Jul 2025 17:00:51 +0200 Subject: [PATCH] :sparkles: Expose flags for common submodule --- common/src/app/common/flags.cljc | 2 ++ frontend/src/app/config.cljs | 6 ++++++ 2 files changed, 8 insertions(+) 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)]