mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-08 22:39:36 +08:00
refactor(ThinkingEffect): adjust container height and padding for improved layout
This commit is contained in:
parent
7fb7061ca7
commit
dc6ec2ba78
@ -30,9 +30,10 @@ const ThinkingEffect: React.FC<Props> = ({ isThinking, thinkingTimeText, content
|
|||||||
}, [expanded, isThinking])
|
}, [expanded, isThinking])
|
||||||
|
|
||||||
const LINE_HEIGHT = 14
|
const LINE_HEIGHT = 14
|
||||||
|
|
||||||
const containerHeight = useMemo(() => {
|
const containerHeight = useMemo(() => {
|
||||||
if (!showThinking || messages.length < 2) return 38
|
if (!showThinking || messages.length < 1) return 38
|
||||||
return Math.min(68, Math.max(messages.length + 1, 2) * LINE_HEIGHT + 10)
|
return Math.min(75, Math.max(messages.length + 1, 2) * LINE_HEIGHT + 25)
|
||||||
}, [showThinking, messages.length])
|
}, [showThinking, messages.length])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -103,7 +104,7 @@ const Title = styled.div`
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 14px;
|
line-height: 14px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
padding: 6px 0;
|
padding: 10px 0;
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
transition: padding-top 150ms;
|
transition: padding-top 150ms;
|
||||||
&.showThinking {
|
&.showThinking {
|
||||||
@ -131,6 +132,7 @@ const LoadingContainer = styled.div`
|
|||||||
const TextContainer = styled.div`
|
const TextContainer = styled.div`
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
padding: 5px 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
`
|
`
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user