Skip to content

Commit 133e048

Browse files
authored
Merge branch 'dev' into feature-extension
2 parents 297ae81 + 8cc5a1d commit 133e048

File tree

6 files changed

+20
-5
lines changed

6 files changed

+20
-5
lines changed

client/packages/lowcoder/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
display: flex;
2929
pointer-events: none;
3030
flex-direction: column;
31+
top: 0;
32+
z-index: 10000;
3133
}
3234
#loading svg {
3335
animation: breath 1s linear infinite;

client/packages/lowcoder/src/comps/comps/rootComp.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import { ExternalEditorContext } from "util/context/ExternalEditorContext";
3434
import { useUserViewMode } from "util/hooks";
3535
import React from "react";
3636
import { isEqual } from "lodash";
37-
37+
import {LoadingBarHideTrigger} from "@lowcoder-ee/util/hideLoading";
3838
const EditorView = lazy(
3939
() => import("pages/editor/editorView"),
4040
);
@@ -138,6 +138,7 @@ const RootView = React.memo((props: RootViewProps) => {
138138
<div key={key}>{comp.children.queries.children[key].getView()}</div>
139139
))}
140140
<Suspense fallback={!readOnly || isUserViewMode ? SuspenseFallback : null}>
141+
<LoadingBarHideTrigger />
141142
<EditorView uiComp={comp.children.ui} preloadComp={comp.children.preload} />
142143
</Suspense>
143144
</EditorContext.Provider>

client/packages/lowcoder/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if (!window.ResizeObserver) {
2424
window.ResizeObserver = ResizeObserver;
2525
}
2626

27-
function hideLoading() {
27+
export function hideLoading() {
2828
// hide loading
2929
const node = document.getElementById("loading");
3030
if (node) {
@@ -42,7 +42,7 @@ debug(`REACT_APP_LOG_LEVEL:, ${REACT_APP_LOG_LEVEL}`);
4242

4343
try {
4444
bootstrap();
45-
hideLoading();
45+
// hideLoading();
4646
} catch (e) {
4747
log.error(e);
4848
}

client/packages/lowcoder/src/pages/ApplicationV2/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ import AppEditor from "../editor/AppEditor";
7373
import { fetchDeploymentIdAction } from "@lowcoder-ee/redux/reduxActions/configActions";
7474
import { getDeploymentId } from "@lowcoder-ee/redux/selectors/configSelectors";
7575
import { SimpleSubscriptionContextProvider } from '@lowcoder-ee/util/context/SimpleSubscriptionContext';
76-
76+
import {LoadingBarHideTrigger} from "@lowcoder-ee/util/hideLoading";
7777
const TabLabel = styled.div`
7878
font-weight: 500;
7979
`;
@@ -222,6 +222,7 @@ export default function ApplicationHome() {
222222

223223
return (
224224
<DivStyled>
225+
<LoadingBarHideTrigger />
225226
<SimpleSubscriptionContextProvider>
226227
<Layout
227228
sections={[

client/packages/lowcoder/src/pages/userAuth/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { fetchConfigAction } from "redux/reduxActions/configActions";
1111
import { fetchUserAction } from "redux/reduxActions/userActions";
1212
import LoginAdmin from "./loginAdmin";
1313
import _ from "lodash";
14-
14+
import {LoadingBarHideTrigger} from "@lowcoder-ee/util/hideLoading";
1515
export default function UserAuth() {
1616
const dispatch = useDispatch();
1717
const location = useLocation<AuthLocationState>();
@@ -50,6 +50,7 @@ export default function UserAuth() {
5050
fetchUserAfterAuthSuccess,
5151
}}
5252
>
53+
<LoadingBarHideTrigger />
5354
<Switch location={location}>
5455
<Redirect exact from={USER_AUTH_URL} to={AUTH_LOGIN_URL} />
5556
<Route exact path={ADMIN_AUTH_URL} component={LoginAdmin} />
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import {useEffect} from "react";
2+
import {hideLoading} from "@lowcoder-ee/index";
3+
4+
export const LoadingBarHideTrigger = function(props: any) {
5+
useEffect(() => {
6+
setTimeout(() => hideLoading(), 300);
7+
}, []);
8+
9+
return <></>
10+
};

0 commit comments

Comments
 (0)