From 6fd7a2369093f41e3427612bfa81d1f6e86d59bd Mon Sep 17 00:00:00 2001 From: Vitaly Kornilov Date: Fri, 24 Jul 2020 18:20:42 +0300 Subject: [PATCH] :wrench: ldap frontend config, locales, gulp config --- frontend/gulpfile.js | 5 +++++ frontend/resources/locales.json | 9 +++++++++ frontend/src/uxbox/config.cljs | 2 ++ 3 files changed, 16 insertions(+) diff --git a/frontend/gulpfile.js b/frontend/gulpfile.js index 1d4bc778d..ec348345e 100644 --- a/frontend/gulpfile.js +++ b/frontend/gulpfile.js @@ -113,6 +113,7 @@ function readConfig(data) { const demoWarn = process.env.UXBOX_DEMO_WARNING; const deployDate = process.env.UXBOX_DEPLOY_DATE; const deployCommit = process.env.UXBOX_DEPLOY_COMMIT; + const loginWithLDAP = process.env.UXBOX_LOGIN_WITH_LDAP; let cfg = { demoWarning: demoWarn === "true" @@ -130,6 +131,10 @@ function readConfig(data) { cfg.deployCommit = deployCommit; } + if (loginWithLDAP !== undefined) { + cfg.loginWithLDAP = loginWithLDAP; + } + Object.assign(cfg, data); return JSON.stringify(cfg); diff --git a/frontend/resources/locales.json b/frontend/resources/locales.json index 00c7b3e43..1906fb9e3 100644 --- a/frontend/resources/locales.json +++ b/frontend/resources/locales.json @@ -107,6 +107,15 @@ "es" : "Entrar" } }, + "auth.login-with-ldap-submit-label" : { + "used-in" : [ "src/uxbox/main/ui/auth/login.cljs:108" ], + "translations" : { + "en" : "Sign in with LDAP", + "fr" : "", + "es" : "", + "ru" : "Вход через LDAP" + } + }, "auth.login-subtitle" : { "used-in" : [ "src/uxbox/main/ui/auth/login.cljs:89" ], "translations" : { diff --git a/frontend/src/uxbox/config.cljs b/frontend/src/uxbox/config.cljs index dc0e70614..3fce9afb9 100644 --- a/frontend/src/uxbox/config.cljs +++ b/frontend/src/uxbox/config.cljs @@ -15,10 +15,12 @@ puri (obj/get config "publicURI") wuri (obj/get config "workerURI") gcid (obj/get config "googleClientID" true) + lwl (obj/get config "loginWithLDAP" false) warn (obj/get config "demoWarning" true)] (def default-language "en") (def demo-warning warn) (def google-client-id gcid) + (def login-with-ldap lwl) (def worker-uri wuri) (def public-uri puri) (def default-theme "default")))