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>