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
|
2023-10-23 19:31:41 +02:00
|
|
|
[app.main.features :as features]
|
|
|
|
[app.main.store :as st]
|
2024-04-19 11:14:52 +02:00
|
|
|
[app.plugins :as plugins]
|
2023-10-23 19:31:41 +02:00
|
|
|
[app.util.timers :as tm]))
|
2022-07-12 13:52:48 +02:00
|
|
|
|
2023-04-12 16:14:36 +02:00
|
|
|
(defn ^:export is-components-v2 []
|
2023-10-23 19:31:41 +02:00
|
|
|
(features/active-feature? @st/state "components/v2"))
|
2023-03-15 18:02:57 +01:00
|
|
|
|
2023-07-10 11:27:43 +02:00
|
|
|
(defn ^:export grid []
|
2023-10-23 19:31:41 +02:00
|
|
|
(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"))
|
2024-06-21 12:44:35 +02:00
|
|
|
(plugins/init-plugins-runtime!)
|
2024-04-18 16:41:43 +02:00
|
|
|
nil)
|
|
|
|
|