Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ const AudioAttachment = ({
isExpanded={isExpanded}
/>
{isExpanded && (
<audio src={host + attachment.audio_url} width="100%" controls />
<audio
src={host + attachment.audio_url}
style={{ maxHeight: '100%', maxWidth: '100%' }}
controls
/>
)}

{attachment.attachments &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,12 @@ const VideoAttachment = ({
/>
{isExpanded && (
<video
width={300}
controls
style={{
borderBottomLeftRadius: 'inherit',
borderBottomRightRadius: 'inherit',
maxWidth: '100%',
maxHeight: '200px',
}}
>
<source
Expand Down
3 changes: 3 additions & 0 deletions packages/react/src/views/Message/Message.styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export const getMessageStyles = ({ theme }) => {
padding-left: 2.25rem;
padding-right: 2.25rem;
color: ${theme.colors.foreground};
@media (max-width: 768px) {
padding-left: 0.8rem;
}
`,
messageEditing: css`
background-color: ${theme.colors.secondary};
Expand Down
10 changes: 9 additions & 1 deletion packages/react/src/views/Message/MessageAvatarContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,15 @@ const MessageAvatarContainer = ({
<Avatar
url={getUserAvatarUrl(message.u.username)}
alt="avatar"
size={message.t ? '1.2em' : '2.25em'}
size={
window.matchMedia('(max-width: 768px)').matches
? message.t
? '1.2em'
: '1.5em'
: message.t
? '1.5em'
: '2.25em'
}
onClick={handleAvatarClick}
/>
) : null}
Expand Down
Loading