mirror of
https://github.com/element-hq/element-web
synced 2024-11-26 19:26:04 +03:00
improve RoomPreviewBar as per https://github.com/vector-im/vector-web/issues/761
This commit is contained in:
parent
cb4bbc04e0
commit
e55a375d6f
2 changed files with 9 additions and 1 deletions
|
@ -1107,6 +1107,7 @@ module.exports = React.createClass({
|
|||
canJoin={ true } canPreview={ false }
|
||||
spinner={this.state.joining}
|
||||
inviterName={inviterName}
|
||||
room={this.state.room}
|
||||
/>
|
||||
</div>
|
||||
<div className="mx_RoomView_messagePanel"></div>
|
||||
|
@ -1147,6 +1148,7 @@ module.exports = React.createClass({
|
|||
inviterName={ inviterName }
|
||||
canJoin={ true } canPreview={ false }
|
||||
spinner={this.state.joining}
|
||||
room={this.state.room}
|
||||
/>
|
||||
</div>
|
||||
<div className="mx_RoomView_messagePanel"></div>
|
||||
|
@ -1219,6 +1221,7 @@ module.exports = React.createClass({
|
|||
onRejectClick={ this.onRejectThreepidInviteButtonClicked }
|
||||
spinner={this.state.joining}
|
||||
inviterName={inviterName}
|
||||
room={this.state.room}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@ -1226,6 +1229,7 @@ module.exports = React.createClass({
|
|||
aux = (
|
||||
<RoomPreviewBar onJoinClick={this.onJoinButtonClicked} canJoin={true}
|
||||
spinner={this.state.joining} canPreview={ this.state.canPeek }
|
||||
room={this.state.room}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ module.exports = React.createClass({
|
|||
canJoin: React.PropTypes.bool,
|
||||
canPreview: React.PropTypes.bool,
|
||||
spinner: React.PropTypes.bool,
|
||||
room: React.PropTypes.object,
|
||||
},
|
||||
|
||||
getDefaultProps: function() {
|
||||
|
@ -66,10 +67,13 @@ module.exports = React.createClass({
|
|||
|
||||
}
|
||||
else if (this.props.canJoin) {
|
||||
var name = this.props.room ? this.props.room.name : "";
|
||||
name = name ? <b>{ name }</b> : "a room";
|
||||
joinBlock = (
|
||||
<div>
|
||||
<div className="mx_RoomPreviewBar_join_text">
|
||||
Would you like to <a onClick={ this.props.onJoinClick }>join</a> this room?
|
||||
You are trying to access { name }.<br/>
|
||||
Would you like to <a onClick={ this.props.onJoinClick }>join</a> in order to participate in the discussion?
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue