Enable google auth button only when is enabled.

This commit is contained in:
Andrey Antukh 2020-05-26 12:53:22 +02:00
parent 5983155680
commit 550ca7e4b2
2 changed files with 9 additions and 5 deletions

View file

@ -12,11 +12,13 @@
(this-as global (this-as global
(let [config (obj/get global "uxboxConfig") (let [config (obj/get global "uxboxConfig")
puri (obj/get config "publicURI" "http://localhost:3449") puri (obj/get config "publicURI" "http://localhost:3449")
buri (obj/get config "backendURI" "http://localhost:6060") buri (obj/get config "backendURI" "http://localhost:6060")
gcid (obj/get config "googleClientID" true)
warn (obj/get config "demoWarning" true)] warn (obj/get config "demoWarning" true)]
(def default-language "en") (def default-language "en")
(def demo-warning warn) (def demo-warning warn)
(def backend-uri buri) (def backend-uri buri)
(def google-client-id gcid)
(def public-uri puri) (def public-uri puri)
(def default-theme "default"))) (def default-theme "default")))

View file

@ -12,6 +12,7 @@
[cljs.spec.alpha :as s] [cljs.spec.alpha :as s]
[beicon.core :as rx] [beicon.core :as rx]
[rumext.alpha :as mf] [rumext.alpha :as mf]
[uxbox.config :as cfg]
[uxbox.common.spec :as us] [uxbox.common.spec :as us]
[uxbox.main.ui.icons :as i] [uxbox.main.ui.icons :as i]
[uxbox.main.data.auth :as da] [uxbox.main.data.auth :as da]
@ -78,9 +79,10 @@
[:& login-form {:locale locale}] [:& login-form {:locale locale}]
[:a.btn-secondary.btn-large.btn-google-auth (when cfg/google-client-id
{:on-click login-with-google} [:a.btn-secondary.btn-large.btn-google-auth
"Login with google"] {:on-click login-with-google}
"Login with google"])
[:div.links [:div.links
[:div.link-entry [:div.link-entry