mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-29 22:10:57 +08:00
image viewing tweaks
This commit is contained in:
parent
78cff9f20d
commit
363e3f4e21
@ -128,10 +128,13 @@ a:visited {
|
|||||||
max-width: 75%;
|
max-width: 75%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_ImageView {
|
.mx_Dialog_lightbox .mx_Dialog_background {
|
||||||
margin: 6px;
|
opacity: 0.85;
|
||||||
/* hack: flexbox bug? */
|
}
|
||||||
margin-bottom: 4px;
|
|
||||||
|
.mx_Dialog_lightbox .mx_Dialog {
|
||||||
|
border-radius: 0px;
|
||||||
|
background-color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_Dialog_content {
|
.mx_Dialog_content {
|
||||||
|
@ -61,7 +61,7 @@ module.exports = React.createClass({
|
|||||||
src: httpUrl,
|
src: httpUrl,
|
||||||
width: content.info.w,
|
width: content.info.w,
|
||||||
height: content.info.h
|
height: content.info.h
|
||||||
});
|
}, "mx_Dialog_lightbox");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ module.exports = React.createClass({
|
|||||||
var cli = MatrixClientPeg.get();
|
var cli = MatrixClientPeg.get();
|
||||||
|
|
||||||
var thumbHeight = null;
|
var thumbHeight = null;
|
||||||
if (content.info) thumbHeight = this.thumbHeight(content.info.w, content.info.h, 320, 240);
|
if (content.info) thumbHeight = this.thumbHeight(content.info.w, content.info.h, 480, 360);
|
||||||
|
|
||||||
var imgStyle = {};
|
var imgStyle = {};
|
||||||
if (thumbHeight) imgStyle['height'] = thumbHeight;
|
if (thumbHeight) imgStyle['height'] = thumbHeight;
|
||||||
@ -78,7 +78,7 @@ module.exports = React.createClass({
|
|||||||
return (
|
return (
|
||||||
<span className="mx_MImageTile">
|
<span className="mx_MImageTile">
|
||||||
<a href={cli.mxcUrlToHttp(content.url)} onClick={ this.onClick }>
|
<a href={cli.mxcUrlToHttp(content.url)} onClick={ this.onClick }>
|
||||||
<img className="mx_MImageTile_thumbnail" src={cli.mxcUrlToHttp(content.url, 320, 240)} alt={content.body} style={imgStyle} />
|
<img className="mx_MImageTile_thumbnail" src={cli.mxcUrlToHttp(content.url, 480, 360)} alt={content.body} style={imgStyle} />
|
||||||
</a>
|
</a>
|
||||||
<div className="mx_MImageTile_download">
|
<div className="mx_MImageTile_download">
|
||||||
<a href={cli.mxcUrlToHttp(content.url)} target="_blank">
|
<a href={cli.mxcUrlToHttp(content.url)} target="_blank">
|
||||||
|
Loading…
Reference in New Issue
Block a user