diff --git a/app/client/public/index.html b/app/client/public/index.html index c8b529591a..9158857ba0 100755 --- a/app/client/public/index.html +++ b/app/client/public/index.html @@ -1,214 +1,257 @@ - - - - - Appsmith - - - + + - - - - + + - - -
- -
-
-
- + - - - - \ No newline at end of file + window.SENTRY_CONFIG = parseConfig("__APPSMITH_SENTRY_DSN__"); + window.APPSMITH_FEATURE_CONFIGS = { + sentry: { + dsn: parseConfig("__APPSMITH_SENTRY_DSN__"), + release: parseConfig("__APPSMITH_SENTRY_RELEASE__"), + environment: parseConfig("__APPSMITH_SENTRY_ENVIRONMENT__"), + }, + smartLook: { + id: parseConfig("__APPSMITH_SMART_LOOK_ID__"), + }, + enableRapidAPI: parseConfig("__APPSMITH_MARKETPLACE_ENABLED__"), + segment: { + apiKey: parseConfig("__APPSMITH_SEGMENT_KEY__"), + ceKey: parseConfig("__APPSMITH_SEGMENT_CE_KEY__"), + }, + fusioncharts: { + licenseKey: parseConfig("__APPSMITH_FUSIONCHARTS_LICENSE_KEY__"), + }, + enableMixpanel: parseConfig("__APPSMITH_SEGMENT_KEY__"), + 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], + cloudHosting: CLOUD_HOSTING, + enableTNCPP: parseConfig("__APPSMITH_TNC_PP__"), + appVersion: { + id: parseConfig("__APPSMITH_VERSION_ID__"), + releaseDate: parseConfig("__APPSMITH_VERSION_RELEASE_DATE__"), + }, + intercomAppID: INTERCOM_APP_ID, + mailEnabled: parseConfig("__APPSMITH_MAIL_ENABLED__"), + cloudServicesBaseUrl: + parseConfig("__APPSMITH_CLOUD_SERVICES_BASE_URL__") || + "https://cs.appsmith.com", + googleRecaptchaSiteKey: parseConfig("__APPSMITH_RECAPTCHA_SITE_KEY__"), + hideWatermark: parseConfig("__APPSMITH_HIDE_WATERMARK__"), + disableIframeWidgetSandbox: parseConfig( + "__APPSMITH_DISABLE_IFRAME_WIDGET_SANDBOX__", + ), + customerPortalUrl: + parseConfig("__APPSMITH_CUSTOMER_PORTAL_URL__") || + "https://customer.appsmith.com", + pricingUrl: + parseConfig("__APPSMITH_PRICING_URL__") || + "https://www.appsmith.com/pricing", + }; + + + diff --git a/app/client/src/pages/Editor/index.tsx b/app/client/src/pages/Editor/index.tsx index 10b1858908..014cd533b3 100644 --- a/app/client/src/pages/Editor/index.tsx +++ b/app/client/src/pages/Editor/index.tsx @@ -42,6 +42,7 @@ import { Spinner } from "design-system"; import SignpostingOverlay from "pages/Editor/FirstTimeUserOnboarding/Overlay"; import { editorInitializer } from "../../utils/editor/EditorUtils"; import { widgetInitialisationSuccess } from "../../actions/widgetActions"; +import { isAirgapped } from "@appsmith/utils/airgapHelpers"; type EditorProps = { currentApplicationId?: string; @@ -138,7 +139,18 @@ class Editor extends Component { this.props.resetEditorRequest(); } + // This function is triggered on load of google apis javascript library + gapiLoaded = () => { + (window as any).googleAPIsLoaded = true; + return undefined; + }; + onError = () => { + (window as any).googleAPIsLoaded = false; + return undefined; + }; + public render() { + const isAirgappedInstance = isAirgapped(); if (!this.props.isEditorInitialized || this.props.loadingGuidedTour) { return ( { {`${this.props.currentApplicationName} |`} Editor | Appsmith + + {!isAirgappedInstance && !(window as any)?.googleAPIsLoaded ? ( +