diff --git a/frontend/gulpfile.js b/frontend/gulpfile.js
index 04aa654a0..968fe3717 100644
--- a/frontend/gulpfile.js
+++ b/frontend/gulpfile.js
@@ -100,6 +100,16 @@ function readLocales() {
return JSON.stringify(result);
}
+function readConfig() {
+ const apiUrl = process.env.UXBOX_API_URL;
+ const demoWarn = process.env.UXBOX_DEMO_WARNING;
+
+ return JSON.stringify({
+ apiUrl: (apiUrl === undefined ? "http://localhost:6060" : apiUrl.trim()),
+ demoWarning: demoWarn === "true",
+ });
+}
+
function templatePipeline(options) {
return function() {
const input = options.input;
@@ -108,11 +118,13 @@ function templatePipeline(options) {
const locales = readLocales();
const icons = readSvgSprite();
+ const config = readConfig();
const tmpl = mustache({
ts: ts,
ic: icons,
- tr: JSON.stringify(locales),
+ config: JSON.stringify(config),
+ translations: JSON.stringify(locales),
});
return gulp.src(input)
diff --git a/frontend/resources/templates/index.mustache b/frontend/resources/templates/index.mustache
index 7c2a08582..88c30382e 100644
--- a/frontend/resources/templates/index.mustache
+++ b/frontend/resources/templates/index.mustache
@@ -14,8 +14,12 @@
+
-
+