PromucFlow_constructor/app/client/public/index.html

81 lines
3.1 KiB
HTML
Raw Normal View History

2019-01-21 15:11:10 +00:00
<!DOCTYPE html>
<html lang="en">
2019-11-06 12:12:41 +00:00
<head>
2020-05-05 12:16:51 +00:00
<meta charset="utf-8" />
2019-11-06 12:12:41 +00:00
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<link href="https://fonts.googleapis.com/css?family=DM+Sans:400,500,700&display=swap" rel="stylesheet" />
2019-11-06 12:12:41 +00:00
<title>Appsmith</title>
2020-05-05 12:16:51 +00:00
<style>
#loader {
position: fixed;
left: 0;
top: 0;
height: 4px;
background: #D36500;
2020-05-05 12:16:51 +00:00
transition: all ease-in 0.3s;
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tinymce/5.4.0/tinymce.min.js" referrerpolicy="origin"></script>
2019-11-06 12:12:41 +00:00
</head>
2019-11-06 12:12:41 +00:00
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
2020-05-05 12:16:51 +00:00
<div id="loader" style="width: 30vw;"></div>
2019-11-06 12:12:41 +00:00
<div id="root"></div>
2020-01-22 12:26:25 +00:00
<script type="text/javascript">
2020-05-05 12:16:51 +00:00
window.addEventListener("DOMContentLoaded", (event) => {
document.getElementById("loader").style.width = "50vw";
});
window.addEventListener("load", (event) => {
document.getElementById("loader").style.width = "100vw";
setTimeout(() => {
document.getElementById("loader").style.opacity = 0;
});
});
const registerPageServiceWorker = () => {
if ("serviceWorker" in navigator) {
window.addEventListener("load", function () {
navigator.serviceWorker.register("/pageService.js").catch(error => {
console.log("Service Worker Registration failed: " + error);
});
});
}
};
registerPageServiceWorker();
Use injected configuration from Nginx at runtime instead of build time (#30) * Use envsubst and nginx templates to generate nginx configs which can substitute environment variables and inject into the index.html file * Fix path in dockerfile. Add .gitignore and .env.example files. Fix nginx-linux template. * Add all environment variables. Add prefix to all environment variables. Update scripts to attempt to substitute all environment variables with the prefix * Setup dockerfile to execute a bash script. use env.example for fetching environment variables in development * Toggle features based on injected configs. Fix nginx template substitution script. * Update env.example file * Remove debug code from start-nginx.sh * Fix nginx config templates by adding quotes by default. Fix sed regex to include numerals. Toggle social login buttons on Login page based on the config. * Update rapid api environment variable name. Toggle oauth buttons based on config in SignUp page. Update .env.example to be a union of server and client environment variables * Adding a Map disabled message on Map widget * Adding links to Privacy policy and TNC * Use REACT_APP_ env variables with higher priority over injected config variables for toggling features * Update netlify.toml by commenting out the build environment variables * Remove env variables not required by the client * Remove start-storybook entry from package.json * Fix netlify.toml. Fallback algolia configs * Add contexts to netlify.toml for successful deploys. Swith to using APPSMITH_MARKETPLACE_URL as the toggle for RapidAPI feature on the client. Remove comments in nginx config templates. Fix template used in dockerfile. Co-authored-by: Satbir Singh <apple@apples-MacBook-Pro.local> Co-authored-by: Satbir Singh <satbir121@gmail.com>
2020-07-07 10:22:17 +00:00
</script>
<script type="text/javascript">
const parseConfig = (config) => {
if(config.indexOf("__") === 0 || config.indexOf("$") === 0)
return "";
return config.trim();
}
const LOG_LEVELS = ["debug", "error"];
const CONFIG_LOG_LEVEL_INDEX = LOG_LEVELS.indexOf(parseConfig("__APPSMITH_CLIENT_LOG_LEVEL__"));
window.SENTRY_CONFIG = parseConfig("__APPSMITH_SENTRY_DSN__");
window.APPSMITH_FEATURE_CONFIGS = {
sentry: parseConfig("__APPSMITH_SENTRY_DSN__"),
hotjar: {
id: parseConfig("__APPSMITH_HOTJAR_HJID__"),
sv: parseConfig("__APPSMITH_HOTJAR_HJSV__"),
},
enableGoogleOAuth: parseConfig("__APPSMITH_OAUTH2_GOOGLE_CLIENT_ID__").length > 0,
enableGithubOAuth: parseConfig("__APPSMITH_OAUTH2_GITHUB_CLIENT_ID__").length > 0,
enableRapidAPI: parseConfig("__APPSMITH_MARKETPLACE_URL__").length > 0,
segment: parseConfig("__APPSMITH_SEGMENT_KEY__"),
optimizely: parseConfig("__APPSMITH_OPTIMIZELY_KEY__"),
enableMixpanel: parseConfig("__APPSMITH_SEGMENT_KEY__").length > 0,
algolia: {
apiId: parseConfig("__APPSMITH_ALGOLIA_API_ID__"),
apiKey: parseConfig("__APPSMITH_ALGOLIA_API_KEY__"),
indexName: parseConfig("__APPSMITH_ALGOLIA_SEARCH_INDEX_NAME__"),
},
logLevel: CONFIG_LOG_LEVEL_INDEX > -1 ? LOG_LEVELS[CONFIG_LOG_LEVEL_INDEX] : LOG_LEVELS[1],
google: parseConfig("__APPSMITH_GOOGLE_MAPS_API_KEY__"),
enableTNCPP: parseConfig("__APPSMITH_TNC_PP__").length > 0
};
2020-01-22 12:26:25 +00:00
</script>
2020-05-05 12:16:51 +00:00
<script rel="prefetch" type="text/javascript" src="/shims/realms-shim.umd.min.js"></script>
2019-11-06 12:12:41 +00:00
</body>
2020-05-05 12:16:51 +00:00
</html>