-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1108 from chat2db/dev
Dev
- Loading branch information
Showing
9 changed files
with
109 additions
and
25 deletions.
There are no files selected for viewing
Binary file not shown.
48 changes: 48 additions & 0 deletions
48
chat2db-client/src/components/OpenScreenAnimation/index.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
.openScreenAnimation { | ||
position: absolute; | ||
top: 0; | ||
bottom: 0; | ||
left: 0; | ||
right: 0; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
// animation: disNone 0.666s 0.666s forwards; | ||
background-color: var(--color-bg-base); | ||
z-index: 100000; | ||
|
||
.textImg{ | ||
line-height: 40px; | ||
font-size: 45px; | ||
font-weight: bold; | ||
width: 200px; | ||
height: 40px; | ||
text-align: right; | ||
} | ||
|
||
.brandName{ | ||
width: 0; | ||
display: flex; | ||
justify-content: flex-end; | ||
overflow: hidden; | ||
animation: textAnimation 0.666s 0.333s ease-in-out forwards; | ||
} | ||
} | ||
|
||
@keyframes textAnimation { | ||
0% { | ||
width: 0; | ||
} | ||
100% { | ||
width: 200px; | ||
} | ||
} | ||
|
||
@keyframes disNone { | ||
0% { | ||
display: flex; | ||
} | ||
100% { | ||
display: none; | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
chat2db-client/src/components/OpenScreenAnimation/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React, { memo } from 'react'; | ||
import styles from './index.less'; | ||
import classnames from 'classnames'; | ||
import BrandLogo from '@/components/BrandLogo' | ||
|
||
interface IProps { | ||
className?: string; | ||
} | ||
|
||
export default memo<IProps>((props) => { | ||
const { className } = props; | ||
return <div className={classnames(styles.openScreenAnimation, className)}> | ||
<BrandLogo size={80} className={styles.brandLogo} /> | ||
<div className={styles.brandName}> | ||
<div className={styles.textImg}> | ||
Chat2DB | ||
</div> | ||
</div> | ||
</div> | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
import React, { useEffect } from 'react'; | ||
import OpenScreenAnimation from '@/components/OpenScreenAnimation'; | ||
|
||
function Test() { | ||
const token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOjIsImRldmljZSI6ImRlZmF1bHQtZGV2aWNlIiwiZWZmIjoxNzA2ODU0NTMwMDI3LCJyblN0ciI6Ik1RcHRPOUVBVlJlbGRQa1RFN01MZUpLeG5KTGVwRFpaIn0.knOw08E6mwWF_GpkeQ8KflQlfQuNu4jd-_Bgh7EnCj4' | ||
useEffect(() => { | ||
const socket = new WebSocket(`ws://127.0.0.1:10821/api/ws/${token}`); | ||
socket.onopen = () => { | ||
console.log('open'); | ||
socket.send('hello'); | ||
}; | ||
}, []); | ||
return (false); | ||
// const token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOjIsImRldmljZSI6ImRlZmF1bHQtZGV2aWNlIiwiZWZmIjoxNzA2ODU0NTMwMDI3LCJyblN0ciI6Ik1RcHRPOUVBVlJlbGRQa1RFN01MZUpLeG5KTGVwRFpaIn0.knOw08E6mwWF_GpkeQ8KflQlfQuNu4jd-_Bgh7EnCj4' | ||
// useEffect(() => { | ||
// const socket = new WebSocket(`ws://127.0.0.1:10821/api/ws/${token}`); | ||
// socket.onopen = () => { | ||
// console.log('open'); | ||
// socket.send('hello'); | ||
// }; | ||
// }, []); | ||
return <OpenScreenAnimation />; | ||
} | ||
|
||
export default Test; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters