Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fixed an issue miss loading-indicator.#1336

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
FalkWolsky merged 1 commit intodevfromfeature-loading-indicator
Nov 23, 2024
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletionsclient/packages/lowcoder/index.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -28,6 +28,8 @@
display: flex;
pointer-events: none;
flex-direction: column;
top: 0;
z-index: 10000;
}
#loading svg {
animation: breath 1s linear infinite;
Expand Down
3 changes: 2 additions & 1 deletionclient/packages/lowcoder/src/comps/comps/rootComp.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -34,7 +34,7 @@ import { ExternalEditorContext } from "util/context/ExternalEditorContext";
import { useUserViewMode } from "util/hooks";
import React from "react";
import { isEqual } from "lodash";

import {LoadingBarHideTrigger} from "@lowcoder-ee/util/hideLoading";
const EditorView = lazy(
() => import("pages/editor/editorView"),
);
Expand DownExpand Up@@ -138,6 +138,7 @@ const RootView = React.memo((props: RootViewProps) => {
<div key={key}>{comp.children.queries.children[key].getView()}</div>
))}
<Suspense fallback={!readOnly || isUserViewMode ? SuspenseFallback : null}>
<LoadingBarHideTrigger />
<EditorView uiComp={comp.children.ui} preloadComp={comp.children.preload} />
</Suspense>
</EditorContext.Provider>
Expand Down
4 changes: 2 additions & 2 deletionsclient/packages/lowcoder/src/index.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,7 +24,7 @@ if (!window.ResizeObserver) {
window.ResizeObserver = ResizeObserver;
}

function hideLoading() {
exportfunction hideLoading() {
// hide loading
const node = document.getElementById("loading");
if (node) {
Expand All@@ -42,7 +42,7 @@ debug(`REACT_APP_LOG_LEVEL:, ${REACT_APP_LOG_LEVEL}`);

try {
bootstrap();
hideLoading();
//hideLoading();
} catch (e) {
log.error(e);
}
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -73,7 +73,7 @@ import AppEditor from "../editor/AppEditor";
import { fetchDeploymentIdAction } from "@lowcoder-ee/redux/reduxActions/configActions";
import { getDeploymentId } from "@lowcoder-ee/redux/selectors/configSelectors";
import { SimpleSubscriptionContextProvider } from '@lowcoder-ee/util/context/SimpleSubscriptionContext';

import {LoadingBarHideTrigger} from "@lowcoder-ee/util/hideLoading";
const TabLabel = styled.div`
font-weight: 500;
`;
Expand DownExpand Up@@ -222,6 +222,7 @@ export default function ApplicationHome() {

return (
<DivStyled>
<LoadingBarHideTrigger />
<SimpleSubscriptionContextProvider>
<Layout
sections={[
Expand Down
3 changes: 2 additions & 1 deletionclient/packages/lowcoder/src/pages/userAuth/index.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,7 @@ import { fetchConfigAction } from "redux/reduxActions/configActions";
import { fetchUserAction } from "redux/reduxActions/userActions";
import LoginAdmin from "./loginAdmin";
import _ from "lodash";

import {LoadingBarHideTrigger} from "@lowcoder-ee/util/hideLoading";
export default function UserAuth() {
const dispatch = useDispatch();
const location = useLocation<AuthLocationState>();
Expand DownExpand Up@@ -50,6 +50,7 @@ export default function UserAuth() {
fetchUserAfterAuthSuccess,
}}
>
<LoadingBarHideTrigger />
<Switch location={location}>
<Redirect exact from={USER_AUTH_URL} to={AUTH_LOGIN_URL} />
<Route exact path={ADMIN_AUTH_URL} component={LoginAdmin} />
Expand Down
10 changes: 10 additions & 0 deletionsclient/packages/lowcoder/src/util/hideLoading.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
import {useEffect} from "react";
import {hideLoading} from "@lowcoder-ee/index";

export const LoadingBarHideTrigger = function(props: any) {
useEffect(() => {
setTimeout(() => hideLoading(), 300);
}, []);

return <></>
};
Loading

[8]ページ先頭

©2009-2025 Movatter.jp