Skip to content

Commit 69a82f7

Browse files
authored
Merge pull request element-hq#5497 from vector-im/luke/groups-room-info
Add toggle to alter visibility of room-group association
2 parents fb8e41a + 06ce467 commit 69a82f7

5 files changed

Lines changed: 81 additions & 6 deletions

File tree

‎src/components/structures/RightPanel.js‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ module.exports = React.createClass({
9090
RoomMemberList: 'RoomMemberList',
9191
GroupMemberList: 'GroupMemberList',
9292
GroupRoomList: 'GroupRoomList',
93+
GroupRoomInfo: 'GroupRoomInfo',
9394
FilePanel: 'FilePanel',
9495
NotificationPanel: 'NotificationPanel',
9596
RoomMemberInfo: 'RoomMemberInfo',
@@ -217,7 +218,7 @@ module.exports = React.createClass({
217218
} else if (payload.action === "view_group_room") {
218219
this.setState({
219220
phase: this.Phase.GroupRoomInfo,
220-
groupRoom: payload.groupRoom,
221+
groupRoomId: payload.groupRoomId,
221222
});
222223
} else if (payload.action === "view_group_room_list") {
223224
this.setState({
@@ -312,7 +313,7 @@ module.exports = React.createClass({
312313
analytics={['Right Panel', 'Group Member List Button', 'click']}
313314
/>,
314315
<HeaderButton key="_roomsButton" title={_t('Rooms')} iconSrc="img/icons-room.svg"
315-
isHighlighted={this.state.phase === this.Phase.GroupRoomList}
316+
isHighlighted={[this.Phase.GroupRoomList, this.Phase.GroupRoomInfo].includes(this.state.phase)}
316317
clickPhase={this.Phase.GroupRoomList}
317318
analytics={['Right Panel', 'Group Room List Button', 'click']}
318319
/>,
@@ -349,9 +350,9 @@ module.exports = React.createClass({
349350
key={this.state.member.user_id} />;
350351
} else if (this.state.phase == this.Phase.GroupRoomInfo) {
351352
panel = <GroupRoomInfo
352-
groupRoom={this.state.groupRoom}
353+
groupRoomId={this.state.groupRoomId}
353354
groupId={this.props.groupId}
354-
key={this.state.groupRoom.roomId} />;
355+
key={this.state.groupRoomId} />;
355356
} else if (this.state.phase == this.Phase.NotificationPanel) {
356357
panel = <NotificationPanel />;
357358
} else if (this.state.phase == this.Phase.FilePanel) {
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
Copyright 2017 New Vector Ltd.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
const React = require('react');
18+
19+
module.exports = React.createClass({
20+
displayName: 'InlineSpinner',
21+
22+
render: function() {
23+
var w = this.props.w || 16;
24+
var h = this.props.h || 16;
25+
var imgClass = this.props.imgClassName || "";
26+
27+
return (
28+
<div className="mx_InlineSpinner">
29+
<img src="img/spinner.gif" width={w} height={h} className={imgClass}/>
30+
</div>
31+
);
32+
}
33+
});

‎src/skins/vector/css/_components.scss‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@
5555
@import "./matrix-react-sdk/views/rooms/_MemberInfo.scss";
5656
@import "./matrix-react-sdk/views/rooms/_MemberList.scss";
5757
@import "./matrix-react-sdk/views/rooms/_MessageComposer.scss";
58+
@import "./matrix-react-sdk/views/rooms/_PinnedEventTile.scss";
59+
@import "./matrix-react-sdk/views/rooms/_PinnedEventsPanel.scss";
5860
@import "./matrix-react-sdk/views/rooms/_PresenceLabel.scss";
5961
@import "./matrix-react-sdk/views/rooms/_RoomHeader.scss";
6062
@import "./matrix-react-sdk/views/rooms/_RoomList.scss";
@@ -68,8 +70,6 @@
6870
@import "./matrix-react-sdk/views/voip/_CallView.scss";
6971
@import "./matrix-react-sdk/views/voip/_IncomingCallbox.scss";
7072
@import "./matrix-react-sdk/views/voip/_VideoView.scss";
71-
@import "./matrix-react-sdk/views/rooms/_PinnedEventsPanel.scss";
72-
@import "./matrix-react-sdk/views/rooms/_PinnedEventTile.scss";
7373
@import "./vector-web/_fonts.scss";
7474
@import "./vector-web/structures/_CompatibilityPage.scss";
7575
@import "./vector-web/structures/_HomePage.scss";
@@ -86,6 +86,7 @@
8686
@import "./vector-web/views/dialogs/_SetPasswordDialog.scss";
8787
@import "./vector-web/views/directory/_NetworkDropdown.scss";
8888
@import "./vector-web/views/elements/_ImageView.scss";
89+
@import "./vector-web/views/elements/_InlineSpinner.scss";
8990
@import "./vector-web/views/elements/_Spinner.scss";
9091
@import "./vector-web/views/globals/_MatrixToolbar.scss";
9192
@import "./vector-web/views/messages/_DateSeparator.scss";

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,19 @@ limitations under the License.
9494
cursor: pointer;
9595
}
9696

97+
.mx_MemberInfo label {
98+
font-size: 13px;
99+
}
100+
101+
.mx_MemberInfo label .mx_MemberInfo_label_text {
102+
display: inline-block;
103+
max-width: 180px;
104+
vertical-align: text-top;
105+
}
106+
107+
.mx_MemberInfo input[type="radio"] {
108+
vertical-align: -2px;
109+
margin-right: 5px;
110+
margin-left: 8px;
111+
}
112+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
Copyright 2017 New Vector Ltd.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
.mx_InlineSpinner {
18+
display: inline;
19+
}
20+
21+
.mx_InlineSpinner img {
22+
margin: 0px 6px;
23+
vertical-align: -3px;
24+
}

0 commit comments

Comments
 (0)