diff --git a/client/packages/lowcoder/package.json b/client/packages/lowcoder/package.json index 1b39a10fa..03c4ace78 100644 --- a/client/packages/lowcoder/package.json +++ b/client/packages/lowcoder/package.json @@ -68,6 +68,7 @@ "react-documents": "^1.2.1", "react-dom": "^18.2.0", "react-draggable": "^4.4.4", + "react-error-boundary": "^4.0.13", "react-grid-layout": "^1.3.0", "react-helmet": "^6.1.0", "react-joyride": "^2.4.0", diff --git a/client/packages/lowcoder/src/app.tsx b/client/packages/lowcoder/src/app.tsx index df273a323..413eeccc3 100644 --- a/client/packages/lowcoder/src/app.tsx +++ b/client/packages/lowcoder/src/app.tsx @@ -95,13 +95,15 @@ class AppIndex extends React.Component { } componentDidUpdate(prevProps: AppIndexProps) { - if(prevProps.currentOrgId !== this.props.currentOrgId && this.props.currentOrgId !== '') { + if ( + prevProps.currentOrgId !== this.props.currentOrgId && + this.props.currentOrgId !== '' + ) { this.props.fetchConfig(this.props.currentOrgId); } } - render() { - const isTemplate = hasQueryParam("template"); + const isTemplate = hasQueryParam('template'); const pathname = history.location.pathname; // we check if we are on the public cloud @@ -126,56 +128,151 @@ class AppIndex extends React.Component { {{this.props.brandName}} {} - - + + - - - - + + + - - - - + + + + - - + + - - - - - + + + + + - - - + + + {/* }, */} {isLowCoderDomain && [ // Adding Support for iframely to be able to embedd the component explorer in the docu - , - , + , + , - , - , - , + , + , + , // adding Clearbit Support for Analytics - + , ]} - - - - {/* + + + {/* // we decided to show the org homepage in a own navigation page {!this.props.orgDev && !!this.props.defaultHomePage ? ( { /> )} */} - {!this.props.orgDev ? ( - - ) : ( - - )} - - - - - - - - - - - - - - {developEnv() && ( - <> - - - - - - )} - - + {!this.props.orgDev ? ( + + ) : ( + + )} + + + + + + + + + + + + + + {developEnv() && ( + <> + + + + + + )} + + ); } @@ -271,7 +404,7 @@ export function bootstrap() { const root = createRoot(container!); root.render( - + ); } diff --git a/client/packages/lowcoder/src/pages/editor/AppEditor.tsx b/client/packages/lowcoder/src/pages/editor/AppEditor.tsx index cb3de06f6..805c7af18 100644 --- a/client/packages/lowcoder/src/pages/editor/AppEditor.tsx +++ b/client/packages/lowcoder/src/pages/editor/AppEditor.tsx @@ -26,8 +26,10 @@ import { fetchFolderElements } from "redux/reduxActions/folderActions"; import { registryDataSourcePlugin } from "constants/queryConstants"; import { DatasourceApi } from "api/datasourceApi"; import { useRootCompInstance } from "./useRootCompInstance"; -import ErrorBoundary from "antd/es/alert/ErrorBoundary"; import EditorSkeletonView from "./editorSkeletonView"; +import {ErrorBoundary, FallbackProps} from 'react-error-boundary'; +import { ALL_APPLICATIONS_URL } from "@lowcoder-ee/constants/routesURL"; +import history from "util/history"; const AppSnapshot = lazy(() => { return import("pages/editor/appSnapshot") @@ -133,9 +135,14 @@ export default function AppEditor() { }) ); }, [viewMode, applicationId, dispatch]); - +const fallbackUI = ( +
+

Something went wrong while displaying this webpage

+ +
+); return ( - + {showAppSnapshot ? ( }> =16.13.1" + checksum: 50398d080015d51d22c6f94c56f4ea336d10232d72345b36ee6f15b6b643666d20b072829b02f091a80e5af68fe67f68a62ef0d2b649dbd759ead929304449af + languageName: node + linkType: hard + "react-fast-compare@npm:^3.0.1, react-fast-compare@npm:^3.1.1, react-fast-compare@npm:^3.2.2": version: 3.2.2 resolution: "react-fast-compare@npm:3.2.2"