1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-10 09:22:25 +03:00

Show file name and size on images on hover (#6511)

* Show simple file name and size on images/videos

Fixes https://github.com/vector-im/element-web/issues/18197

* i18n

* Fix bad merge

* Add hover state tracking

* Only show on timeline-like objects

* Match new design requirements

* Remove video support (deemed not needed)

* Colouring and sizing from design

* Include file name in lightbox

* Revert changes to videos since we don't need them

* i18n

* Iterate PR

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Travis Ralston
2022-05-14 02:31:53 -06:00
committed by GitHub
parent f54d54b3ff
commit f51a6b6da4
7 changed files with 52 additions and 4 deletions

View File

@@ -344,7 +344,7 @@ export default class MFileBody extends React.Component<IProps, IState> {
</a>
{ this.context.timelineRenderingType === TimelineRenderingType.File && (
<div className="mx_MImageBody_size">
{ this.content.info && this.content.info.size ? filesize(this.content.info.size) : "" }
{ this.content.info?.size ? filesize(this.content.info.size) : "" }
</div>
) }
</div> }