Skip to content

Commit adabb89

Browse files
committed
取消开屏动画
1 parent 3cf18ee commit adabb89

File tree

3 files changed

+7
-82
lines changed

3 files changed

+7
-82
lines changed

chat2db-client/src/components/OpenScreenAnimation/index.less

Lines changed: 0 additions & 48 deletions
This file was deleted.

chat2db-client/src/components/OpenScreenAnimation/index.tsx

Lines changed: 0 additions & 20 deletions
This file was deleted.

chat2db-client/src/layouts/GlobalLayout/index.tsx

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ import { ThemeType } from '@/constants';
1515
import GlobalComponent from '../init/GlobalComponent';
1616
import styles from './index.less';
1717
import { useUserStore, queryCurUser } from '@/store/user';
18-
import AppTitleBar from '@/blocks/AppTitleBar';
19-
import OpenScreenAnimation from '@/components/OpenScreenAnimation';
2018

2119
const GlobalLayout = () => {
2220
const [appTheme, setAppTheme] = useTheme();
@@ -63,20 +61,18 @@ const GlobalLayout = () => {
6361
};
6462

6563
// 等待状态页面
66-
// if (serviceStatus === ServiceStatus.PENDING || curUser === null) {
67-
// return (
68-
// <div className={styles.app}>
69-
// <AppTitleBar className={styles.appTitleBar} />
70-
// <Spin className={styles.loadingBox} size="large" />
71-
// </div>
72-
// );
73-
// }
64+
if (serviceStatus === ServiceStatus.PENDING || curUser === null) {
65+
return (
66+
<div className={styles.app}>
67+
<Spin className={styles.loadingBox} size="large" />
68+
</div>
69+
);
70+
}
7471

7572
// 错误状态页面
7673
if (serviceStatus === ServiceStatus.FAILURE) {
7774
return (
7875
<div className={styles.app}>
79-
<AppTitleBar className={styles.appTitleBar} />
8076
<div className={styles.loadingBox}>
8177
<Button type="primary" onClick={restartPolling} style={{ marginBottom: 20 }}>
8278
<SyncOutlined />
@@ -100,9 +96,6 @@ const GlobalLayout = () => {
10096
return (
10197
<ConfigProvider locale={isEn ? antdEnUS : antdZhCN} theme={antdTheme}>
10298
<div className={styles.app}>
103-
{/* Open screen animation */}
104-
{(serviceStatus === ServiceStatus.PENDING || curUser === null) && <OpenScreenAnimation />}
105-
<AppTitleBar className={styles.appTitleBar} />
10699
<div className={styles.appBody}>
107100
<Outlet />
108101
</div>

0 commit comments

Comments
 (0)