diff --git a/packages/uiweb/src/lib/components/chat/ChatProfile/ChatProfile.tsx b/packages/uiweb/src/lib/components/chat/ChatProfile/ChatProfile.tsx index 0281249b6..239197f47 100644 --- a/packages/uiweb/src/lib/components/chat/ChatProfile/ChatProfile.tsx +++ b/packages/uiweb/src/lib/components/chat/ChatProfile/ChatProfile.tsx @@ -219,10 +219,11 @@ export const ChatProfile: React.FC = ({ return ( {/* For showing Chat Profile */} -
+ {chatProfileLeftHelperComponent && (
= ({ }} loading={initialized.loading || initialized.profile.recipient === '' || initialized.profile.icon === ''} /> -
+
{/* For showing group related icons and menu */} -
= ({ cursor="pointer" maxHeight="1.75rem" overflow="hidden" + flex="none" > {chatProfileRightHelperComponent}
@@ -322,7 +324,7 @@ export const ChatProfile: React.FC = ({ )} )} -
+ {/* For showing chat info modal | modal && */} {modal && @@ -352,6 +354,8 @@ export const ChatProfile: React.FC = ({ const Container = styled(Section)` width: auto; + max-width: 100%; + overflow: hidden; background: ${(props) => props.theme.backgroundColor.chatProfileBackground}; border: ${(props) => props.theme.border?.chatProfile}; border-radius: ${(props) => props.theme.borderRadius?.chatProfile}; @@ -362,7 +366,14 @@ const Container = styled(Section)` padding: 6px; box-sizing: border-box; align-self: stretch; - box-sizing: border-box; +`; + +const AddonComponentSection = styled(Section)` + gap: 10px; + + @media ${device.mobileL} { + gap: 5px; + } ; `; const ImageItem = styled.div` diff --git a/packages/uiweb/src/lib/components/chat/ChatView/ChatViewComponent.tsx b/packages/uiweb/src/lib/components/chat/ChatView/ChatViewComponent.tsx index 87fa3d8d6..43a59fc24 100644 --- a/packages/uiweb/src/lib/components/chat/ChatView/ChatViewComponent.tsx +++ b/packages/uiweb/src/lib/components/chat/ChatView/ChatViewComponent.tsx @@ -119,7 +119,8 @@ export const ChatViewComponent: React.FC = (options: IC )} {/* Load ChatViewList if in options */} -
= (options: IC chatId={initialized.derivedChatId} /> )} -
- - {/* Check if user is not in read mode */} - {/* This will probably be not needed anymore */} - {/* {!signer && !(!!account && !!pgpPrivateKey) && !isConnected && ( -
- -
- )} */} + {/* Load MessageInput if in options and user is present */} {messageInput && user && (
` border: ${(props) => props.theme.border?.chatViewComponent}; box-sizing: border-box; `; + +const ChatViewSection = styled(Section)` + @media (${device.mobileL}) { + margin: 0; + } +`; diff --git a/packages/uiweb/src/lib/components/chat/ChatViewBubble/cards/message/FrameRenderer.tsx b/packages/uiweb/src/lib/components/chat/ChatViewBubble/cards/message/FrameRenderer.tsx index a73d28ee3..ae086669f 100644 --- a/packages/uiweb/src/lib/components/chat/ChatViewBubble/cards/message/FrameRenderer.tsx +++ b/packages/uiweb/src/lib/components/chat/ChatViewBubble/cards/message/FrameRenderer.tsx @@ -523,4 +523,5 @@ const FrameInput = styled.input` const PreviewAnchor = styled(Anchor)` text-decoration: none; + align-self: flex-end; `; diff --git a/packages/uiweb/src/lib/components/chat/ChatViewBubble/cards/message/MessageCard.tsx b/packages/uiweb/src/lib/components/chat/ChatViewBubble/cards/message/MessageCard.tsx index 7aef928b0..1d1517cb8 100644 --- a/packages/uiweb/src/lib/components/chat/ChatViewBubble/cards/message/MessageCard.tsx +++ b/packages/uiweb/src/lib/components/chat/ChatViewBubble/cards/message/MessageCard.tsx @@ -287,7 +287,7 @@ const MessageCardSection = styled(Section)` &.video, &.frame { max-width: 512px; - min-width: 240px; + min-width: 200px; & > ${MessageSection} { width: 100%; diff --git a/packages/uiweb/src/lib/components/chat/MessageInput/MessageInput.tsx b/packages/uiweb/src/lib/components/chat/MessageInput/MessageInput.tsx index 9aaa33add..f81639c56 100644 --- a/packages/uiweb/src/lib/components/chat/MessageInput/MessageInput.tsx +++ b/packages/uiweb/src/lib/components/chat/MessageInput/MessageInput.tsx @@ -550,126 +550,119 @@ export const MessageInput: React.FC = ({ ) : null} {user && !user?.readmode() && (((isRules ? verified : true) && isMember) || (chatInfo && !groupInfo)) && ( - <> -
- {emoji && ( -
setShowEmojis(!showEmojis)} - > - -
- )} - {showEmojis && ( -
- + {emoji && ( +
setShowEmojis(!showEmojis)} + > + +
+ )} + {showEmojis && ( +
+ +
+ )} + + { + if (event.key === 'Enter' && !event.shiftKey) { + event.preventDefault(); + sendTextMsg(); + } + }} + placeholder="Type your message..." + onChange={(e) => onChangeTypedMessage(e.target.value)} + value={typedMessage} + ref={textAreaRef} + rows={1} + /> + {gif && ( +
setGifOpen(!gifOpen)} + > + +
+ )} + {gifOpen && ( +
+ +
+ )} +
+ {!fileUploading && file && ( + <> +
+ +
+ uploadFile(e)} /> -
+ )} - { - if (event.key === 'Enter' && !event.shiftKey) { - event.preventDefault(); - sendTextMsg(); - } - }} - placeholder="Type your message..." - onChange={(e) => onChangeTypedMessage(e.target.value)} - value={typedMessage} - ref={textAreaRef} - rows={1} - />
- - {gif && ( -
setGifOpen(!gifOpen)} - > - -
- )} - {gifOpen && ( -
- -
- )} -
- {!fileUploading && file && ( - <> -
- -
- uploadFile(e)} - /> - - )} + {!(loading || fileUploading) && ( +
sendTextMsg()} + > +
- {!(loading || fileUploading) && ( -
sendTextMsg()} - > - -
- )} + )} - {(loading || fileUploading) && ( -
- -
- )} - - + {(loading || fileUploading) && ( +
+ +
+ )} + )} @@ -696,9 +689,9 @@ const MessageInputContainer = styled(Section)` `; const SendSection = styled(Section)` - gap: 11.5px; + gap: 12px; @media ${device.mobileL} { - gap: 7.5px; + gap: 8px; } `; const MultiLineInput = styled.textarea` @@ -717,7 +710,8 @@ const MultiLineInput = styled.textarea` padding-right: 5px; align-self: end; @media ${device.mobileL} { - font-size: 14px; + font-size: 16px; + width: 100%; } &&::-webkit-scrollbar { width: 4px; diff --git a/packages/uiweb/src/lib/components/chat/reusables/ProfileContainer.tsx b/packages/uiweb/src/lib/components/chat/reusables/ProfileContainer.tsx index 34ebf5db5..d11c75c3b 100644 --- a/packages/uiweb/src/lib/components/chat/reusables/ProfileContainer.tsx +++ b/packages/uiweb/src/lib/components/chat/reusables/ProfileContainer.tsx @@ -65,10 +65,11 @@ export const ProfileContainer = ({ theme, member, copy, customStyle, loading }:
{member?.icon && ( @@ -105,7 +106,7 @@ export const ProfileContainer = ({ theme, member, copy, customStyle, loading }: fontWeight={customStyle?.fontWeight ?? '400'} color={customStyle?.textColor ?? theme.textColor?.modalSubHeadingText} position="relative" - cursor="pointer" + textAlign="left" > {member.name && member.web3Name ? member.name : member.name || member.web3Name} @@ -117,7 +118,7 @@ export const ProfileContainer = ({ theme, member, copy, customStyle, loading }: gap="5px" cursor="pointer" minHeight="22px" - minWidth="180px" + minWidth="140px" onMouseEnter={() => { const text = member.chatId === member.recipient ? 'Copy Chat ID' : 'Copy Wallet'; setCopyText(text); @@ -140,6 +141,8 @@ export const ProfileContainer = ({ theme, member, copy, customStyle, loading }: position="relative" whiteSpace="nowrap" cursor="pointer" + textWrap="wrap" + textAlign="left" > {member?.name && member?.web3Name ? `${member?.web3Name} | ${member.abbrRecipient}` diff --git a/packages/uiweb/src/lib/components/reusables/sharedStyling.tsx b/packages/uiweb/src/lib/components/reusables/sharedStyling.tsx index 3efd64a4d..5ab16ba78 100644 --- a/packages/uiweb/src/lib/components/reusables/sharedStyling.tsx +++ b/packages/uiweb/src/lib/components/reusables/sharedStyling.tsx @@ -167,6 +167,7 @@ type SpanStyleProps = { cursor?: string; whiteSpace?: string; visibility?: string; + textWrap?: string; }; export const Span = styled.span` @@ -194,6 +195,7 @@ export const Span = styled.span` z-index: ${(props) => props.zIndex || 'auto'}; max-width: ${(props) => props.maxWidth || 'initial'}; white-space: ${(props) => props.whiteSpace || 'normal'}; + text-wrap: ${(props) => props.textWrap || 'normal'}; &.skeleton { > * {