File tree Expand file tree Collapse file tree 6 files changed +19
-3
lines changed Expand file tree Collapse file tree 6 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 28
28
display : flex;
29
29
pointer-events : none;
30
30
flex-direction : column;
31
+ top : 0 ;
32
+ z-index : 10000 ;
31
33
}
32
34
# loading svg {
33
35
animation : breath 1s linear infinite;
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ import { ExternalEditorContext } from "util/context/ExternalEditorContext";
34
34
import { useUserViewMode } from "util/hooks" ;
35
35
import React from "react" ;
36
36
import { isEqual } from "lodash" ;
37
+ import { LoadingBarHideTrigger } from "@lowcoder-ee/util/hideLoading" ;
37
38
38
39
const EditorView = lazy (
39
40
( ) => import ( "pages/editor/editorView" ) ,
@@ -138,6 +139,7 @@ const RootView = React.memo((props: RootViewProps) => {
138
139
< div key = { key } > { comp . children . queries . children [ key ] . getView ( ) } </ div >
139
140
) ) }
140
141
< Suspense fallback = { ! readOnly || isUserViewMode ? SuspenseFallback : null } >
142
+ < LoadingBarHideTrigger />
141
143
< EditorView uiComp = { comp . children . ui } preloadComp = { comp . children . preload } />
142
144
</ Suspense >
143
145
</ EditorContext . Provider >
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ import * as uuid from "uuid";
8
8
import "regenerator-runtime/runtime" ;
9
9
import { debug } from "loglevel" ;
10
10
import "./index.less" ;
11
- import log from "loglevel" ;
12
11
import "antd-mobile/es/global" ;
13
12
import 'animate.css' ;
14
13
import { initTranslator as initTranslatorDesign } from "i18n/design" ;
@@ -25,7 +24,7 @@ if (!window.ResizeObserver) {
25
24
window . ResizeObserver = ResizeObserver ;
26
25
}
27
26
28
- function hideLoading ( ) {
27
+ export function hideLoading ( ) {
29
28
// hide loading
30
29
const node = document . getElementById ( "loading" ) ;
31
30
if ( node ) {
@@ -49,6 +48,5 @@ initTranslatorDesign().then(() => {
49
48
const bootstrap = await import ( "./bootstrap/view/app" ) . then ( module => module . bootstrap ) ;
50
49
bootstrap ( ) ;
51
50
}
52
- hideLoading ( ) ;
53
51
} )
54
52
} )
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ import AppEditor from "../editor/AppEditor";
68
68
import { set } from "lodash" ;
69
69
import { MultiIconDisplay } from "@lowcoder-ee/comps/comps/multiIconDisplay" ;
70
70
import { initTranslator as initTranslatorDesign } from "i18n/design" ;
71
+ import { LoadingBarHideTrigger } from "@lowcoder-ee/util/hideLoading" ;
71
72
72
73
const TabLabel = styled . div `
73
74
font-weight: 500;
@@ -218,6 +219,7 @@ export default function ApplicationHome() {
218
219
219
220
return (
220
221
< DivStyled >
222
+ < LoadingBarHideTrigger />
221
223
< Layout
222
224
sections = { [
223
225
{
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { fetchConfigAction } from "redux/reduxActions/configActions";
11
11
import { fetchUserAction } from "redux/reduxActions/userActions" ;
12
12
import LoginAdmin from "./loginAdmin" ;
13
13
import _ from "lodash" ;
14
+ import { LoadingBarHideTrigger } from "@lowcoder-ee/util/hideLoading" ;
14
15
15
16
export default function UserAuth ( ) {
16
17
const dispatch = useDispatch ( ) ;
@@ -50,6 +51,7 @@ export default function UserAuth() {
50
51
fetchUserAfterAuthSuccess,
51
52
} }
52
53
>
54
+ < LoadingBarHideTrigger />
53
55
< Switch location = { location } >
54
56
< Redirect exact from = { USER_AUTH_URL } to = { AUTH_LOGIN_URL } />
55
57
< Route exact path = { ADMIN_AUTH_URL } component = { LoginAdmin } />
Original file line number Diff line number Diff line change
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
+ } ;
You can’t perform that action at this time.
0 commit comments