mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 05:04:57 +08:00
show placeholder of timeline empty
This commit is contained in:
parent
68f644c824
commit
08ad69847c
@ -105,6 +105,7 @@ var FilePanel = React.createClass({
|
||||
showUrlPreview = { false }
|
||||
tileShape="file_grid"
|
||||
opacity={ this.props.opacity }
|
||||
empty="There are no visible files in this room"
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@ -48,6 +48,7 @@ var NotificationPanel = React.createClass({
|
||||
showUrlPreview = { false }
|
||||
opacity={ this.props.opacity }
|
||||
tileShape="notif"
|
||||
empty="You have no visible notifications"
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@ -96,6 +96,9 @@ var TimelinePanel = React.createClass({
|
||||
|
||||
// shape property to be passed to EventTiles
|
||||
tileShape: React.PropTypes.string,
|
||||
|
||||
// placeholder text to use if the timeline is empty
|
||||
empty: React.PropTypes.string,
|
||||
},
|
||||
|
||||
statics: {
|
||||
@ -990,6 +993,14 @@ var TimelinePanel = React.createClass({
|
||||
);
|
||||
}
|
||||
|
||||
if (this.state.events.length == 0) {
|
||||
return (
|
||||
<div className={ this.props.className + " mx_RoomView_messageListWrapper" }>
|
||||
<div className="mx_RoomView_empty">{ this.props.empty }</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
// give the messagepanel a stickybottom if we're at the end of the
|
||||
// live timeline, so that the arrival of new events triggers a
|
||||
// scroll.
|
||||
|
Loading…
Reference in New Issue
Block a user