Skip to content

Commit 80c3b2c

Browse files
committed
match the design
1 parent a2e7c4a commit 80c3b2c

5 files changed

Lines changed: 35 additions & 21 deletions

File tree

‎skins/base/css/molecules/MemberTile.css‎

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ limitations under the License.
1515
*/
1616

1717
.mx_MemberTile {
18-
cursor: pointer;
1918
display: table-row;
2019
height: 49px;
20+
position: relative;
2121
}
2222

2323
.mx_MemberTile_avatar {
2424
display: table-cell;
25+
padding-left: 14px;
2526
padding-right: 12px;
2627
padding-top: 3px;
2728
padding-bottom: 3px;
@@ -31,6 +32,10 @@ limitations under the License.
3132
position: relative;
3233
}
3334

35+
.mx_MemberTile_inviteTile {
36+
cursor: pointer;
37+
}
38+
3439
.mx_MemberTile_inviteEditing {
3540
display: initial ! important;
3641
}
@@ -50,14 +55,14 @@ limitations under the License.
5055
font-size: 14px;
5156
padding: 9px;
5257
margin-top: 6px;
58+
margin-left: 14px;
5359
}
5460

5561
.mx_MemberTile_power {
56-
z-index: 10;
5762
position: absolute;
5863
width: 48px;
5964
height: 48px;
60-
left: -4px;
65+
left: 10px;
6166
top: -1px;
6267
}
6368

@@ -68,6 +73,12 @@ limitations under the License.
6873
text-overflow: ellipsis;
6974
}
7075

76+
.mx_MemberTile_details {
77+
display: table-cell;
78+
padding-right: 14px;
79+
vertical-align: middle;
80+
}
81+
7182
.mx_MemberTile_hover {
7283
background-color: #f0f0f0;
7384
font-size: 12px;
@@ -76,6 +87,16 @@ limitations under the License.
7687

7788
.mx_MemberTile_userId {
7889
font-weight: bold;
90+
overflow: hidden;
91+
text-overflow: ellipsis;
92+
}
93+
94+
.mx_MemberTile_leave {
95+
cursor: pointer;
96+
margin-top: 8px;
97+
margin-right: -4px;
98+
margin-left: 6px;
99+
float: right;
79100
}
80101

81102
/*
@@ -107,7 +128,3 @@ limitations under the License.
107128
.mx_MemberTile_zalgo {
108129
font-family: Helvetica, Arial, Sans-Serif;
109130
}
110-
111-
.mx_MemberTile_leave {
112-
float: right;
113-
}

‎skins/base/css/organisms/MemberList.css‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ limitations under the License.
4242
border: 1px solid #a9dbf4;
4343
overflow-y: auto;
4444
border-radius: 8px;
45-
padding: 20px 14px 14px 24px;
4645
background-color: #fff;
4746

4847
order: 1;
@@ -57,5 +56,5 @@ limitations under the License.
5756
}
5857

5958
.mx_MemberList h2 {
60-
margin-top: 0px;
59+
margin: 14px;
6160
}

‎skins/base/views/atoms/EditableText.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ module.exports = React.createClass({
3333
},
3434

3535
onClickDiv: function() {
36-
console.log("onClickDiv triggered");
3736
this.setState({
3837
phase: this.Phases.Edit,
3938
})

‎skins/base/views/molecules/MemberTile.js‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,12 @@ module.exports = React.createClass({
7070
},
7171

7272
getPrettyPresence: function(user) {
73+
if (!user) return "Unknown";
7374
var presence = user.presence;
74-
return presence.charAt(0).toUpperCase() + presence.slice(1);
75+
if (presence === "online") return "Online";
76+
if (presence === "unavailable") return "Idle"; // XXX: is this actually right?
77+
if (presence === "offline") return "Offline";
78+
return "Unknown";
7579
},
7680

7781
render: function() {
@@ -110,20 +114,20 @@ module.exports = React.createClass({
110114
if (this.state.hover) {
111115
var presence;
112116
// FIXME: make presence data update whenever User.presence changes...
113-
var active = this.props.member.user.lastActiveAgo || -1;
117+
var active = this.props.member.user ? (this.props.member.user.lastActiveAgo || -1) : -1;
114118
if (active >= 0) {
115119
presence = <div className="mx_MemberTile_presence">{ this.getPrettyPresence(this.props.member.user) } for { this.getDuration(active) }</div>;
116120
}
117121
else {
118122
presence = <div className="mx_MemberTile_presence">{ this.getPrettyPresence(this.props.member.user) }</div>;
119123
}
120124

125+
// <MemberInfo member={this.props.member} />
121126
nameEl =
122127
<div className="mx_MemberTile_details">
123-
<MemberInfo member={this.props.member} />
124-
<div className="mx_MemberTile_userId">{ this.props.member.userId }</div>
125-
{ presence }
126128
{ leave }
129+
<div className="mx_MemberTile_userId" title={ this.props.member.userId }>{ this.props.member.userId }</div>
130+
{ presence }
127131
</div>
128132
}
129133
else {

‎skins/base/views/organisms/MemberList.js‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,9 @@ module.exports = React.createClass({
7575
},
7676

7777
inviteTile: function() {
78-
// if (this.state.inviting) {
79-
// return (
80-
// <div></div>
81-
// );
82-
// }
83-
8478
var classes = classNames({
8579
mx_MemberTile: true,
80+
mx_MemberTile_inviteTile: true,
8681
mx_MemberTile_inviteEditing: this.state.editing,
8782
});
8883

0 commit comments

Comments
 (0)