Fix alignment of avatars and status messages

also introduce the status message to the MemberInfo pane

Part of https://github.com/vector-im/riot-web/issues/1528
This commit is contained in:
Travis Ralston 2018-12-12 12:57:48 -07:00
parent ce7969e3d5
commit cd9ea2b2d7
6 changed files with 32 additions and 9 deletions

View file

@ -889,11 +889,13 @@ module.exports = withMatrixClient(React.createClass({
let presenceState;
let presenceLastActiveAgo;
let presenceCurrentlyActive;
let statusMessage;
if (this.props.member.user) {
presenceState = this.props.member.user.presence;
presenceLastActiveAgo = this.props.member.user.lastActiveAgo;
presenceCurrentlyActive = this.props.member.user.currentlyActive;
statusMessage = this.props.member.user.statusMessage;
}
const room = this.props.matrixClient.getRoom(this.props.member.roomId);
@ -915,6 +917,11 @@ module.exports = withMatrixClient(React.createClass({
presenceState={presenceState} />;
}
let statusLabel = null;
if (statusMessage) {
statusLabel = <span className="mx_MemberInfo_statusMessage">{ statusMessage }</span>;
}
let roomMemberDetails = null;
if (this.props.member.roomId) { // is in room
const PowerSelector = sdk.getComponent('elements.PowerSelector');
@ -931,6 +938,7 @@ module.exports = withMatrixClient(React.createClass({
</div>
<div className="mx_MemberInfo_profileField">
{presenceLabel}
{statusLabel}
</div>
</div>;
}