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;
flex-direction: column-reverse;
max-height: calc(100vh - var(--input-bar-height) - var(--navbar-height));
padding: 10px 0;
`
export default Messages

View File

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