0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-21 22:22:43 -05:00
penpot/frontend/src/features.cljs

33 lines
960 B
Text
Raw Normal View History

2022-07-11 11:16:39 +02:00
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
2022-09-20 23:23:22 +02:00
;; Copyright (c) KALEIDOS INC
2022-07-11 11:16:39 +02:00
;; This namespace is only to export the functions for toggle features
(ns features
(:require
[app.main.features :as features]
[app.main.store :as st]
[app.plugins :as plugins]
[app.util.timers :as tm]))
(defn ^:export is-components-v2 []
(features/active-feature? @st/state "components/v2"))
(defn ^:export grid []
(tm/schedule-on-idle #(st/emit! (features/toggle-feature "layout/grid")))
nil)
(defn ^:export get-enabled []
(clj->js (features/get-enabled-features @st/state)))
(defn ^:export get-team-enabled []
(clj->js (features/get-team-enabled-features @st/state)))
2024-04-18 16:41:43 +02:00
(defn ^:export plugins []
2024-04-24 10:25:47 +02:00
(st/emit! (features/enable-feature "plugins/runtime"))
(plugins/init-plugins-runtime!)
2024-04-18 16:41:43 +02:00
nil)