fix: inputbar height

This commit is contained in:
kangfenmao 2024-08-08 17:21:00 +08:00
parent b6500977b0
commit 16c68dcdcb
2 changed files with 3 additions and 6 deletions

View File

@ -137,6 +137,7 @@ const Container = styled.div`
overflow-y: auto; overflow-y: auto;
flex-direction: column-reverse; flex-direction: column-reverse;
max-height: calc(100vh - var(--input-bar-height) - var(--navbar-height)); max-height: calc(100vh - var(--input-bar-height) - var(--navbar-height));
padding: 10px 0;
` `
export default Messages export default Messages

View File

@ -80,10 +80,6 @@ const Inputbar: FC<Props> = ({ assistant, setActiveTopic }) => {
if (event.key === 'Escape') { if (event.key === 'Escape') {
return setExpend(false) return setExpend(false)
} }
if (event.key === 'Enter' && event.shiftKey) {
return sendMessage()
}
return
} }
if (sendMessageShortcut === 'Enter' && event.key === 'Enter') { if (sendMessageShortcut === 'Enter' && event.key === 'Enter') {
@ -145,8 +141,8 @@ const Inputbar: FC<Props> = ({ assistant, setActiveTopic }) => {
}, [assistant]) }, [assistant])
return ( return (
<Container id="inputbar" style={{ minHeight: expended ? '100%' : 'var(--input-bar-height)' }}> <Container id="inputbar" style={{ minHeight: expended ? '80%' : 'var(--input-bar-height)' }}>
<Toolbar onDoubleClick={() => setExpend(!expended)}> <Toolbar>
<ToolbarMenu> <ToolbarMenu>
<Tooltip placement="top" title={t('chat.input.new_topic')} arrow> <Tooltip placement="top" title={t('chat.input.new_topic')} arrow>
<ToolbarButton type="text" onClick={addNewTopic}> <ToolbarButton type="text" onClick={addNewTopic}>