Chats: fix display of media attachments, fix break-words

revert-fa4bd20d
Alex Gleason 2022-12-06 15:45:33 -06:00
rodzic e1c80920ed
commit 2ca4db5c3b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
3 zmienionych plików z 11 dodań i 18 usunięć

Wyświetl plik

@ -262,7 +262,7 @@ const Item: React.FC<IItem> = ({
interface IMediaGallery {
sensitive?: boolean,
media: ImmutableList<Attachment>,
height: number,
height?: number,
onOpenMedia: (media: ImmutableList<Attachment>, index: number) => void,
defaultWidth?: number,
cacheWidth?: (width: number) => void,

Wyświetl plik

@ -183,18 +183,15 @@ const ChatMessageList: React.FC<IChatMessageList> = ({ chat }) => {
const { attachment } = chatMessage;
if (!attachment) return null;
return (
<div className='chat-message__media'>
<Bundle fetchComponent={MediaGallery}>
{(Component: any) => (
<Component
media={ImmutableList([attachment])}
height={120}
onOpenMedia={onOpenMedia}
visible
/>
)}
</Bundle>
</div>
);
};
@ -310,7 +307,7 @@ const ChatMessageList: React.FC<IChatMessageList> = ({ chat }) => {
title={getFormattedTimestamp(chatMessage)}
className={
classNames({
'text-ellipsis break-all relative rounded-md py-2 px-3 max-w-full': true,
'text-ellipsis break-words relative rounded-md py-2 px-3 max-w-full space-y-2': true,
'bg-primary-500 text-white': isMyMessage,
'bg-gray-200 dark:bg-gray-800 text-gray-900 dark:text-gray-100': !isMyMessage,
'!bg-transparent !p-0 emoji-lg': isOnlyEmoji,

Wyświetl plik

@ -292,10 +292,6 @@
}
}
.chat-message__media {
height: 120px;
}
.chat-message .media-gallery {
height: 100% !important;
margin: 4px 0 8px;