mirror of
https://github.com/penpot/penpot.git
synced 2025-05-15 18:46:37 +02:00
Merge pull request #134 from uxbox/other/dynamic-config
🎉 Make the build to be config independent.
This commit is contained in:
commit
4ee138f71e
6 changed files with 38 additions and 21 deletions
|
@ -2,10 +2,15 @@
|
|||
;; 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/.
|
||||
;;
|
||||
;; Copyright (c) 2016 Andrey Antukh <niwi@niwi.nz>
|
||||
;; This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
;; defined by the Mozilla Public License, v. 2.0.
|
||||
;;
|
||||
;; Copyright (c) 2016-2020 Andrey Antukh <niwi@niwi.nz>
|
||||
|
||||
(ns uxbox.config)
|
||||
(ns uxbox.config
|
||||
(:require [goog.object :as gobj]))
|
||||
|
||||
(goog-define url "")
|
||||
(goog-define demo-warning false)
|
||||
(goog-define default-language "en")
|
||||
(let [config (gobj/get goog.global "uxboxConfig")]
|
||||
(def default-language "en")
|
||||
(def url (gobj/get config "apiUrl" "http://localhost:6060/"))
|
||||
(def demo-warning (gobj/get config "demoWarning" true)))
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
(:require
|
||||
[cljs.spec.alpha :as s]
|
||||
[beicon.core :as rx]
|
||||
[goog.object :as gobj]
|
||||
[rumext.alpha :as mf]
|
||||
[uxbox.main.data.auth :refer [logout]]
|
||||
[uxbox.main.data.users :as udu]
|
||||
|
@ -66,11 +67,12 @@
|
|||
(def app-sym (.for js/Symbol "uxbox.app"))
|
||||
|
||||
(defn ^:export init
|
||||
[translations]
|
||||
(i18n/init! (js/JSON.parse translations))
|
||||
(unchecked-set js/window app-sym "main")
|
||||
(st/init)
|
||||
(init-ui))
|
||||
[]
|
||||
(let [translations (gobj/get goog.global "uxboxTranslations")]
|
||||
(i18n/init! translations)
|
||||
(unchecked-set js/window app-sym "main")
|
||||
(st/init)
|
||||
(init-ui)))
|
||||
|
||||
(defn reinit
|
||||
[]
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
;; 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/.
|
||||
;;
|
||||
;; This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
;; defined by the Mozilla Public License, v. 2.0.
|
||||
;;
|
||||
;; Copyright (c) 2015-2019 Andrey Antukh <niwi@niwi.nz>
|
||||
|
||||
(ns uxbox.main.data.workspace
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue