diff --git a/frontend/src/components/TradeBox/EncryptedChat/EncryptedSocketChat/index.tsx b/frontend/src/components/TradeBox/EncryptedChat/EncryptedSocketChat/index.tsx index 672c6c3e..0747ada1 100644 --- a/frontend/src/components/TradeBox/EncryptedChat/EncryptedSocketChat/index.tsx +++ b/frontend/src/components/TradeBox/EncryptedChat/EncryptedSocketChat/index.tsx @@ -312,6 +312,13 @@ const EncryptedSocketChat: React.FC = ({ label={t('Type a message')} variant='standard' size='small' + multiline + maxRows={3} + onKeyDown={(e) => { + if (e.key === 'Enter' && !e.shiftKey) { + onButtonClicked(e); + } + }} helperText={ connected ? peerPubKey diff --git a/frontend/src/components/TradeBox/EncryptedChat/EncryptedTurtleChat/index.tsx b/frontend/src/components/TradeBox/EncryptedChat/EncryptedTurtleChat/index.tsx index 1d00cdfd..35cb7cda 100644 --- a/frontend/src/components/TradeBox/EncryptedChat/EncryptedTurtleChat/index.tsx +++ b/frontend/src/components/TradeBox/EncryptedChat/EncryptedTurtleChat/index.tsx @@ -299,6 +299,13 @@ const EncryptedTurtleChat: React.FC = ({ label={t('Type a message')} variant='standard' size='small' + multiline + maxRows={3} + onKeyDown={(e) => { + if (e.key === 'Enter' && !e.shiftKey) { + onButtonClicked(e); + } + }} value={value} onChange={(e) => { setValue(e.target.value); diff --git a/frontend/src/components/TradeBox/EncryptedChat/MessageCard/index.tsx b/frontend/src/components/TradeBox/EncryptedChat/MessageCard/index.tsx index 6e0e12f5..318ce0e8 100644 --- a/frontend/src/components/TradeBox/EncryptedChat/MessageCard/index.tsx +++ b/frontend/src/components/TradeBox/EncryptedChat/MessageCard/index.tsx @@ -126,7 +126,14 @@ const MessageCard: React.FC = ({ message, isTaker, userConnected, baseUrl {message.encryptedMessage}{' '} ) : ( - message.plainTextMessage + <> + {message.plainTextMessage.split('\n').map((messageLine, idx) => ( + + {messageLine} +
+
+ ))} + ) } subheaderTypographyProps={{