feat(ui): more improvements to initial loading state
This commit is contained in:
parent
b4cab0ec7f
commit
6805a7c1db
@ -2,6 +2,7 @@
|
|||||||
"extends": "stylelint-config-standard-scss",
|
"extends": "stylelint-config-standard-scss",
|
||||||
"rules": {
|
"rules": {
|
||||||
"selector-class-pattern": null,
|
"selector-class-pattern": null,
|
||||||
"no-descending-specificity": null
|
"no-descending-specificity": null,
|
||||||
|
"selector-pseudo-class-no-unknown": null
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -412,6 +412,14 @@ export const ClientConfigStore: FC = () => {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('error parsing status hydration', e);
|
console.error('error parsing status hydration', e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
if ((window as any).configHydration && (window as any).statusHydration) {
|
||||||
|
sendEvent([AppStateEvent.Loaded]);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error('error sending loaded event', e);
|
||||||
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//not sure if this is needed
|
// not sure if this is needed
|
||||||
.statusBar {
|
.statusBar {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
@ -99,10 +99,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.offlineBanner {
|
|
||||||
color: var(--theme-color-background-main);
|
|
||||||
}
|
|
||||||
|
|
||||||
.floatingMobileChatModalButton {
|
.floatingMobileChatModalButton {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
@ -116,3 +112,10 @@
|
|||||||
border-width: 0;
|
border-width: 0;
|
||||||
box-shadow: 0 1px 3px 1px rgb(0 0 0 / 20%);
|
box-shadow: 0 1px 3px 1px rgb(0 0 0 / 20%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.centerSpinner {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { useRecoilState, useRecoilValue } from 'recoil';
|
import { useRecoilState, useRecoilValue } from 'recoil';
|
||||||
import { Skeleton, Col, Row, Button } from 'antd';
|
import { Skeleton, Col, Row, Button, Spin } from 'antd';
|
||||||
import MessageFilled from '@ant-design/icons/MessageFilled';
|
import MessageFilled from '@ant-design/icons/MessageFilled';
|
||||||
import { FC, useEffect, useState } from 'react';
|
import { FC, useEffect, useState } from 'react';
|
||||||
import dynamic from 'next/dynamic';
|
import dynamic from 'next/dynamic';
|
||||||
@ -194,7 +194,12 @@ export const Content: FC = () => {
|
|||||||
<>
|
<>
|
||||||
<>
|
<>
|
||||||
{appState.appLoading && (
|
{appState.appLoading && (
|
||||||
<div className={styles.topSectionElement} style={{ height: '30vh' }} />
|
<div
|
||||||
|
className={classnames([styles.topSectionElement, styles.centerSpinner])}
|
||||||
|
style={{ height: '30vh' }}
|
||||||
|
>
|
||||||
|
<Spin delay={2} size="large" tip="One moment..." />
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
{showChat && !isMobile && <Sidebar />}
|
{showChat && !isMobile && <Sidebar />}
|
||||||
<Row>
|
<Row>
|
||||||
@ -262,6 +267,7 @@ export const Content: FC = () => {
|
|||||||
<BrowserNotifyModal />
|
<BrowserNotifyModal />
|
||||||
</Modal>
|
</Modal>
|
||||||
<Row>
|
<Row>
|
||||||
|
{!name && <Skeleton active loading style={{ marginLeft: '10vw', marginRight: '10vw' }} />}
|
||||||
{isMobile ? (
|
{isMobile ? (
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<MobileContent
|
<MobileContent
|
||||||
|
Loading…
x
Reference in New Issue
Block a user