mirror of https://github.com/vector-im/riot-web
Move inline style to stylesheet
parent
6699c4faed
commit
015093b371
|
@ -35,3 +35,13 @@ limitations under the License.
|
||||||
// Make sure the _thumbnail is positioned relative to the _container
|
// Make sure the _thumbnail is positioned relative to the _container
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mx_MImageBody_thumbnail_spinner {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mx_MImageBody_thumbnail_spinner img {
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
|
@ -239,14 +239,8 @@ export default class extends React.Component {
|
||||||
let img = null;
|
let img = null;
|
||||||
// e2e image hasn't been decrypted yet
|
// e2e image hasn't been decrypted yet
|
||||||
if (content.file !== undefined && this.state.decryptedUrl === null) {
|
if (content.file !== undefined && this.state.decryptedUrl === null) {
|
||||||
img = <div className="mx_MImageBody_thumbnail" ref="image" style={{
|
img = <div className="mx_MImageBody_thumbnail mx_MImageBody_thumbnail_spinner" ref="image">
|
||||||
"display": "flex",
|
<img src="img/spinner.gif" alt={content.body} width="32" height="32" />
|
||||||
"alignItems": "center",
|
|
||||||
"width": "100%",
|
|
||||||
}}>
|
|
||||||
<img src="img/spinner.gif" alt={content.body} width="32" height="32" style={{
|
|
||||||
"margin": "auto",
|
|
||||||
}} />
|
|
||||||
</div>;
|
</div>;
|
||||||
} else if (thumbUrl && !this.state.imgError) {
|
} else if (thumbUrl && !this.state.imgError) {
|
||||||
// Restrict the width of the thumbnail here, otherwise it will fill the container
|
// Restrict the width of the thumbnail here, otherwise it will fill the container
|
||||||
|
|
Loading…
Reference in New Issue