🚧 More work on register/recovery refactor.

This commit is contained in:
Andrey Antukh 2020-01-14 10:35:43 +01:00
parent 9e68041326
commit 6165a49c10
10 changed files with 27 additions and 28 deletions

View file

@ -1090,4 +1090,7 @@ input[type=range]:focus::-ms-fill-upper {
p {
margin: 0;
}
.code {
font-family: monospace;
}
}

View file

@ -8,5 +8,5 @@
(goog-define url "http://127.0.0.1:6060/api")
(goog-define viewurl "/view/index.html")
(goog-define isdemo false)
(goog-define demo-warning false)
(goog-define default-language "en")

View file

@ -40,9 +40,9 @@
[_]
[:div.message-inline
[:p
[:strong "WARNING: "] "this is a " [:strong "demo"] " service."
[:br]
[:strong "DO NOT USE"] " for real work, " [:br]
[:strong "WARNING: "]
"This is a " [:strong "demo"] " service, "
[:strong "DO NOT USE"] " for real work, "
" the projects will be periodicaly wiped."]])
@ -51,7 +51,7 @@
(let [{:keys [data] :as form} (fm/use-form ::login-form {})]
[:form {:on-submit #(on-submit % form)}
[:div.login-content
(when cfg/isdemo
(when cfg/demo-warning
[:& demo-warning])
[:input.input-text

View file

@ -34,6 +34,7 @@
[]
(let [{:keys [data] :as form} (fm/use-form ::recovery-form {})
tr (i18n/use-translations)
on-success
(fn []
(st/emit! (um/info (tr "profile.recovery.password-changed"))

View file

@ -35,7 +35,9 @@
tr (i18n/use-translations)
on-success
(fn []
(st/emit! (um/info (tr "profile.recovery.recovery-token-sent"))))
(st/emit! (um/info (tr "profile.recovery.recovery-token-sent"))
(rt/nav :profile-recovery)))
on-submit
(fn [event]
(dom/prevent-default event)

View file

@ -1,10 +1,9 @@
(require '[clojure.pprint :refer [pprint]]
'[clojure.java.shell :as shell]
'[clojure.java.io :as io]
'[clojure.edn :as edn]
'[figwheel.main.api :as figwheel]
'[environ.core :refer [env]]
'[jsonista.core :as json]
'[cognitect.transit :as t])
'[environ.core :refer [env]])
(require '[cljs.build.api :as api]
'[cljs.repl :as repl]
'[cljs.repl.node :as node])
@ -28,13 +27,12 @@
;; --- Generic Build Options
(def debug? (boolean (:uxbox-debug env nil)))
(def demo? (boolean (:uxbox-demo env nil)))
(def demo? (edn/read-string (:uxbox-demo-warning env "true")))
(def closure-defines
{"uxbox.config.url" (:uxbox-api-url env "http://localhost:6060/api")
"uxbox.config.viewurl" (:uxbox-view-url env "/view/index.html")
"uxbox.config.isdemo" demo?})
{'uxbox.config.url (:uxbox-api-url env "http://localhost:6060/api")
'uxbox.config.viewurl (:uxbox-view-url env "/view/index.html")
'uxbox.config.demo-warning demo?})
(def default-build-options
{:cache-analysis true
@ -42,6 +40,7 @@
:language-in :ecmascript6
:language-out :ecmascript5
:closure-defines closure-defines
:anon-fn-naming-policy :mapped
:optimizations :none
:infer-externs true
:verbose false