Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/eslint1

 Conflicts:
	src/components/views/dialogs/CreateRoomDialog.tsx
	src/components/views/messages/MImageBody.tsx
This commit is contained in:
Michael Telatynski 2021-07-23 10:42:46 +01:00
commit 5ccd02dd6e
47 changed files with 1524 additions and 632 deletions

View file

@ -347,7 +347,7 @@ export default class MImageBody extends React.Component<IBodyProps, IState> {
className="mx_MImageBody_thumbnail"
src={thumbUrl}
ref={this.image}
style={{ maxWidth: maxWidth + "px" }}
style={{ maxWidth: `min(100%, ${maxWidth}px)` }}
alt={content.body}
onError={this.onImageError}
onLoad={this.onImageLoad}
@ -372,7 +372,7 @@ export default class MImageBody extends React.Component<IBodyProps, IState> {
className="mx_MImageBody_thumbnail"
style={{
// Constrain width here so that spinner appears central to the loaded thumbnail
maxWidth: infoWidth + "px",
maxWidth: `min(100%, ${infoWidth}px)`,
}}
>
{ placeholder }
@ -461,7 +461,7 @@ export class HiddenImagePlaceholder extends React.PureComponent<PlaceholderIProp
let className = 'mx_HiddenImagePlaceholder';
if (this.props.hover) className += ' mx_HiddenImagePlaceholder_hover';
return (
<div className={className} style={{ maxWidth: maxWidth }}>
<div className={className} style={{ maxWidth: `min(100%, ${maxWidth}px)` }}>
<div className='mx_HiddenImagePlaceholder_button'>
<span className='mx_HiddenImagePlaceholder_eye' />
<span>{ _t("Show image") }</span>

View file

@ -514,7 +514,7 @@ export default class TextualBody extends React.Component<IBodyProps, IState> {
switch (content.msgtype) {
case MsgType.Emote:
return (
<span className="mx_MEmoteBody mx_EventTile_content">
<div className="mx_MEmoteBody mx_EventTile_content">
*&nbsp;
<span
className="mx_MEmoteBody_sender"
@ -525,21 +525,21 @@ export default class TextualBody extends React.Component<IBodyProps, IState> {
&nbsp;
{ body }
{ widgets }
</span>
</div>
);
case MsgType.Notice:
return (
<span className="mx_MNoticeBody mx_EventTile_content">
<div className="mx_MNoticeBody mx_EventTile_content">
{ body }
{ widgets }
</span>
</div>
);
default: // including "m.text"
return (
<span className="mx_MTextBody mx_EventTile_content">
<div className="mx_MTextBody mx_EventTile_content">
{ body }
{ widgets }
</span>
</div>
);
}
}