Skip to content

Commit c6a9614

Browse files
authored
Merge pull request element-hq#2181 from vector-im/wmwragg/chat-multi-invite
Wmwragg/chat multi invite
2 parents a623430 + 56606c0 commit c6a9614

File tree

11 files changed

+263
-35
lines changed

11 files changed

+263
-35
lines changed

src/components/structures/RightPanel.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,14 @@ module.exports = React.createClass({
109109
}
110110
},
111111

112+
onInviteButtonClick: function() {
113+
// call ChatInviteDialog
114+
dis.dispatch({
115+
action: 'view_invite',
116+
roomId: this.props.roomId,
117+
});
118+
},
119+
112120
onRoomStateMember: function(ev, state, member) {
113121
// redraw the badge on the membership list
114122
if (this.state.phase == this.Phase.MemberList && member.roomId === this.props.roomId) {
@@ -236,6 +244,12 @@ module.exports = React.createClass({
236244
</div>
237245
{ panel }
238246
<div className="mx_RightPanel_footer">
247+
<div className="mx_RightPanel_invite" >
248+
<div className="mx_RightPanel_icon" onClick={ this.onInviteButtonClick } >
249+
<TintableSvg src="img/icon-invite-people.svg" width="35" height="35" />
250+
</div>
251+
<div className="mx_RightPanel_message">Invite to this room</div>
252+
</div>
239253
</div>
240254
</aside>
241255
);

src/skins/vector/css/matrix-react-sdk/structures/MatrixChat.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,6 @@ limitations under the License.
151151
}
152152

153153
.mx_MatrixChat .mx_RightPanel.collapsed {
154-
-webkit-flex: 0 0 72px;
155-
flex: 0 0 72px;
154+
-webkit-flex: 0 0 122px;
155+
flex: 0 0 122px;
156156
}

src/skins/vector/css/matrix-react-sdk/views/dialogs/ChatInviteDialog.css

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -42,33 +42,15 @@ limitations under the License.
4242
padding-right: 4px;
4343
padding-top: 1px;
4444
padding-bottom: 1px;
45-
overflow: hidden;
46-
}
47-
48-
.mx_ChatInviteDialog_queryList {
49-
position: absolute;
50-
background-color: #fff;
51-
width: 485px;
52-
max-height: 116px;
45+
max-height: 150px;
46+
overflow-x: hidden;
5347
overflow-y: scroll;
54-
border-radius: 3px;
55-
background-color: #fff;
56-
border: solid 1px #76cfa6;
57-
cursor: pointer;
5848
}
5949

60-
.mx_ChatInviteDialog_queryListElement .mx_AddressTile {
61-
background-color: #fff;
62-
border: solid 1px #fff;
63-
}
64-
65-
.mx_ChatInviteDialog_queryListElement.mx_ChatInviteDialog_selected {
66-
background-color: #eaf5f0; /* selected colour */
67-
}
68-
69-
.mx_ChatInviteDialog_queryListElement.mx_ChatInviteDialog_selected .mx_AddressTile {
70-
background-color: #eaf5f0; /* selected colour */
71-
border: solid 1px #eaf5f0; /* selected colour */
50+
.mx_ChatInviteDialog_error {
51+
position: absolute;
52+
color: #ff0064;
53+
line-height: 36px;
7254
}
7355

7456
.mx_ChatInviteDialog_cancel {
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
Copyright 2016 OpenMarket 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_AddressSelector {
18+
position: absolute;
19+
background-color: #fff;
20+
width: 485px;
21+
max-height: 116px;
22+
overflow-y: scroll;
23+
border-radius: 3px;
24+
background-color: #fff;
25+
border: solid 1px #76cfa6;
26+
cursor: pointer;
27+
}
28+
29+
.mx_AddressSelector.mx_AddressSelector_empty {
30+
display: none;
31+
}
32+
33+
.mx_AddressSelector_addressListElement .mx_AddressTile {
34+
background-color: #fff;
35+
border: solid 1px #fff;
36+
}
37+
38+
.mx_AddressSelector_addressListElement.mx_AddressSelector_selected {
39+
background-color: #eaf5f0; /* selected colour */
40+
}
41+
42+
.mx_AddressSelector_addressListElement.mx_AddressSelector_selected .mx_AddressTile {
43+
background-color: #eaf5f0; /* selected colour */
44+
border: solid 1px #eaf5f0; /* selected colour */
45+
}

src/skins/vector/css/matrix-react-sdk/views/elements/AddressTile.css

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ limitations under the License.
2323
color: #454545;
2424
font-size: 14px;
2525
font-weight: normal;
26+
margin-right: 4px;
27+
}
28+
29+
.mx_AddressTile.mx_AddressTile_error {
30+
background-color: rgba(255, 0, 100, 0.1);
31+
color: #ff0064;
32+
border-color: #ff0064;
2633
}
2734

2835
.mx_AddressTile_network {
@@ -41,6 +48,13 @@ limitations under the License.
4148
vertical-align: middle;
4249
}
4350

51+
.mx_AddressTile_mx {
52+
display: inline-block;
53+
margin: 0;
54+
border: 0;
55+
padding: 0;
56+
}
57+
4458
.mx_AddressTile_name {
4559
display: inline-block;
4660
padding-right: 4px;
@@ -71,6 +85,47 @@ limitations under the License.
7185
vertical-align: middle;
7286
}
7387

88+
.mx_AddressTile_unknownMx {
89+
display: inline-block;
90+
font-weight: 600;
91+
padding-right: 11px;
92+
}
93+
94+
.mx_AddressTile_unknownMxl.mx_AddressTile_justified {
95+
width: 380px; /* name + id width */
96+
overflow: hidden;
97+
white-space: nowrap;
98+
text-overflow: ellipsis;
99+
vertical-align: middle;
100+
}
101+
102+
.mx_AddressTile_email {
103+
display: inline-block;
104+
font-weight: 600;
105+
padding-right: 11px;
106+
}
107+
108+
.mx_AddressTile_email.mx_AddressTile_justified {
109+
width: 380px; /* name + id width */
110+
overflow: hidden;
111+
white-space: nowrap;
112+
text-overflow: ellipsis;
113+
vertical-align: middle;
114+
}
115+
116+
.mx_AddressTile_unknown {
117+
display: inline-block;
118+
padding-right: 11px;
119+
}
120+
121+
.mx_AddressTile_unknown.mx_AddressTile_justified {
122+
width: 380px; /* name + id width */
123+
overflow: hidden;
124+
white-space: nowrap;
125+
text-overflow: ellipsis;
126+
vertical-align: middle;
127+
}
128+
74129
.mx_AddressTile_dismiss {
75130
display: inline-block;
76131
padding-right: 11px;

src/skins/vector/css/vector-web/structures/LeftPanel.css

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,19 +91,13 @@ limitations under the License.
9191
.collapsed .mx_BottomLeftMenu_createRoom,
9292
.collapsed .mx_BottomLeftMenu_people,
9393
.collapsed .mx_BottomLeftMenu_settings {
94-
margin-left: 0px ! important;
94+
margin-right: 0px ! important;
9595
padding-top: 3px ! important;
9696
padding-bottom: 3px ! important;
9797
}
9898

99-
.mx_LeftPanel .mx_BottomLeftMenu_directory {
100-
margin-right: 10px;
101-
}
102-
103-
.mx_LeftPanel .mx_BottomLeftMenu_createRoom {
104-
margin-right: 10px;
105-
}
106-
99+
.mx_LeftPanel .mx_BottomLeftMenu_directory,
100+
.mx_LeftPanel .mx_BottomLeftMenu_createRoom,
107101
.mx_LeftPanel .mx_BottomLeftMenu_people {
108102
margin-right: 10px;
109103
}

src/skins/vector/css/vector-web/structures/RightPanel.css

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,30 @@ limitations under the License.
103103
-webkit-flex: 0 0 60px;
104104
flex: 0 0 60px;
105105
}
106+
107+
.mx_RightPanel_footer .mx_RightPanel_invite {
108+
line-height: 35px;
109+
font-size: 14px;
110+
color: #4A4A4A;
111+
padding-top: 13px;
112+
padding-left: 5px;
113+
}
114+
115+
.collapsed .mx_RightPanel_footer .mx_RightPanel_invite {
116+
display: none;
117+
}
118+
119+
.mx_RightPanel_invite .mx_RightPanel_icon {
120+
display: inline-block;
121+
cursor: pointer;
122+
}
123+
124+
.mx_RightPanel_invite .mx_RightPanel_icon object {
125+
pointer-events: none;
126+
}
127+
128+
.mx_RightPanel_invite .mx_RightPanel_message {
129+
display: inline-block;
130+
vertical-align: top;
131+
padding-left: 10px
132+
}

src/skins/vector/img/avatar-error.svg

Lines changed: 15 additions & 0 deletions
Loading
Lines changed: 17 additions & 0 deletions
Loading
Lines changed: 24 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)