Skip to content

Commit 2e8f960

Browse files
authored
Merge pull request element-hq#5493 from vector-im/luke/groups-room-info
Implement simple GroupRoomInfo
2 parents 56c6a15 + 2163a54 commit 2e8f960

3 files changed

Lines changed: 16 additions & 19 deletions

File tree

‎src/components/structures/RightPanel.js‎

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,21 +205,27 @@ module.exports = React.createClass({
205205
} else if (this.props.groupId) {
206206
this.setState({
207207
phase: this.Phase.GroupMemberList,
208-
groupId: payload.groupId,
209208
member: payload.member,
210209
});
211210
}
212211
}
213212
} else if (payload.action === "view_group") {
214213
this.setState({
215214
phase: this.Phase.GroupMemberList,
216-
groupId: payload.groupId,
217215
member: null,
218216
});
217+
} else if (payload.action === "view_group_room") {
218+
this.setState({
219+
phase: this.Phase.GroupRoomInfo,
220+
groupRoom: payload.groupRoom,
221+
});
222+
} else if (payload.action === "view_group_room_list") {
223+
this.setState({
224+
phase: this.Phase.GroupRoomList,
225+
});
219226
} else if (payload.action === "view_group_user") {
220227
this.setState({
221228
phase: this.Phase.GroupMemberInfo,
222-
groupId: payload.groupId,
223229
member: payload.member,
224230
});
225231
} else if (payload.action === "view_room") {
@@ -242,6 +248,7 @@ module.exports = React.createClass({
242248
const GroupMemberList = sdk.getComponent('groups.GroupMemberList');
243249
const GroupMemberInfo = sdk.getComponent('groups.GroupMemberInfo');
244250
const GroupRoomList = sdk.getComponent('groups.GroupRoomList');
251+
const GroupRoomInfo = sdk.getComponent('groups.GroupRoomInfo');
245252

246253
const TintableSvg = sdk.getComponent("elements.TintableSvg");
247254

@@ -340,6 +347,11 @@ module.exports = React.createClass({
340347
groupMember={this.state.member}
341348
groupId={this.props.groupId}
342349
key={this.state.member.user_id} />;
350+
} else if (this.state.phase == this.Phase.GroupRoomInfo) {
351+
panel = <GroupRoomInfo
352+
groupRoom={this.state.groupRoom}
353+
groupId={this.props.groupId}
354+
key={this.state.groupRoom.roomId} />;
343355
} else if (this.state.phase == this.Phase.NotificationPanel) {
344356
panel = <NotificationPanel />;
345357
} else if (this.state.phase == this.Phase.FilePanel) {

‎src/skins/vector/css/matrix-react-sdk/views/groups/_GroupRoomList.scss‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,3 @@ limitations under the License.
1919
color: $primary-fg-color;
2020
cursor: pointer;
2121
}
22-
23-
.mx_GroupRoomTile_delete {
24-
opacity: 0.4;
25-
position: absolute;
26-
top: 6px;
27-
right: 10px;
28-
cursor: pointer;
29-
30-
display: none;
31-
}
32-
33-
.mx_GroupRoomTile:hover > .mx_GroupRoomTile_delete {
34-
display: initial;
35-
}
36-

‎src/skins/vector/css/matrix-react-sdk/views/rooms/_EntityTile.scss‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ limitations under the License.
5757
font-size: 14px;
5858
text-overflow: ellipsis;
5959
white-space: nowrap;
60-
max-width: 135px;
60+
max-width: 155px;
6161
}
6262

6363
.mx_EntityTile_details {

0 commit comments

Comments
 (0)