diff --git a/skins/base/css/molecules/MemberTile.css b/skins/base/css/molecules/MemberTile.css index ddd3962b..2f735f62 100644 --- a/skins/base/css/molecules/MemberTile.css +++ b/skins/base/css/molecules/MemberTile.css @@ -51,3 +51,11 @@ limitations under the License. overflow: hidden; text-overflow: ellipsis; } + +.mx_MemberTile_unavailable { + opacity: 0.75; +} + +.mx_MemberTile_offline { + opacity: 0.5; +} \ No newline at end of file diff --git a/skins/base/views/molecules/MemberTile.js b/skins/base/views/molecules/MemberTile.js index 4e00f2af..1286173d 100644 --- a/skins/base/views/molecules/MemberTile.js +++ b/skins/base/views/molecules/MemberTile.js @@ -46,9 +46,21 @@ module.exports = React.createClass({ var img = "img/p/p" + Math.floor(20 * this.props.member.powerLevelNorm / 100) + ".png"; power = ; } + var presenceClass = "mx_MemberTile_offline"; + var mainClassName = "mx_MemberTile "; + if (this.props.member.user) { + if (this.props.member.user.presence === "online") { + presenceClass = "mx_MemberTile_online"; + } + else if (this.props.member.user.presence === "unavailable") { + presenceClass = "mx_MemberTile_unavailable"; + } + } + mainClassName += presenceClass; return ( -