Skip to content

Commit 89f8ff4

Browse files
committed
Merge branch 'develop' into matthew/notif-panel
2 parents 3a8c94d + e6c4273 commit 89f8ff4

File tree

12 files changed

+98
-75
lines changed

12 files changed

+98
-75
lines changed

src/component-index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ module.exports.components['views.login.VectorLoginFooter'] = require('./componen
4848
module.exports.components['views.login.VectorLoginHeader'] = require('./components/views/login/VectorLoginHeader');
4949
module.exports.components['views.messages.DateSeparator'] = require('./components/views/messages/DateSeparator');
5050
module.exports.components['views.messages.MessageTimestamp'] = require('./components/views/messages/MessageTimestamp');
51-
module.exports.components['views.rooms.BottomLeftMenuTile'] = require('./components/views/rooms/BottomLeftMenuTile');
52-
module.exports.components['views.rooms.RoomDNDView'] = require('./components/views/rooms/RoomDNDView');
51+
module.exports.components['views.rooms.DNDRoomTile'] = require('./components/views/rooms/DNDRoomTile');
5352
module.exports.components['views.rooms.RoomDropTarget'] = require('./components/views/rooms/RoomDropTarget');
5453
module.exports.components['views.rooms.RoomTooltip'] = require('./components/views/rooms/RoomTooltip');
5554
module.exports.components['views.rooms.SearchBar'] = require('./components/views/rooms/SearchBar');

src/components/structures/BottomLeftMenu.js

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,28 @@ module.exports = React.createClass({
3030

3131
getInitialState: function() {
3232
return({
33+
directoryHover : false,
3334
roomsHover : false,
3435
peopleHover : false,
3536
settingsHover : false,
3637
});
3738
},
3839

3940
// Room events
41+
onDirectoryClick: function() {
42+
dis.dispatch({ action: 'view_room_directory' });
43+
},
44+
45+
onDirectoryMouseEnter: function() {
46+
this.setState({ directoryHover: true });
47+
},
48+
49+
onDirectoryMouseLeave: function() {
50+
this.setState({ directoryHover: false });
51+
},
52+
4053
onRoomsClick: function() {
41-
dis.dispatch({action: 'view_create_room'});
54+
dis.dispatch({ action: 'view_create_room' });
4255
},
4356

4457
onRoomsMouseEnter: function() {
@@ -51,7 +64,7 @@ module.exports = React.createClass({
5164

5265
// People events
5366
onPeopleClick: function() {
54-
dis.dispatch({action: 'view_create_chat'});
67+
dis.dispatch({ action: 'view_create_chat' });
5568
},
5669

5770
onPeopleMouseEnter: function() {
@@ -64,7 +77,7 @@ module.exports = React.createClass({
6477

6578
// Settings events
6679
onSettingsClick: function() {
67-
dis.dispatch({action: 'view_user_settings'});
80+
dis.dispatch({ action: 'view_user_settings' });
6881
},
6982

7083
onSettingsMouseEnter: function() {
@@ -88,9 +101,13 @@ module.exports = React.createClass({
88101
return (
89102
<div className="mx_BottomLeftMenu">
90103
<div className="mx_BottomLeftMenu_options">
104+
<div className="mx_BottomLeftMenu_directory" onClick={ this.onDirectoryClick } onMouseEnter={ this.onDirectoryMouseEnter } onMouseLeave={ this.onDirectoryMouseLeave } >
105+
<TintableSvg src="img/icons-directory.svg" width="25" height="25"/>
106+
{ this.getLabel("Room directory", this.state.directoryHover) }
107+
</div>
91108
<div className="mx_BottomLeftMenu_createRoom" onClick={ this.onRoomsClick } onMouseEnter={ this.onRoomsMouseEnter } onMouseLeave={ this.onRoomsMouseLeave } >
92109
<TintableSvg src="img/icons-create-room.svg" width="25" height="25" />
93-
{ this.getLabel("Rooms", this.state.roomsHover) }
110+
{ this.getLabel("Create new room", this.state.roomsHover) }
94111
</div>
95112
<div className="mx_BottomLeftMenu_people" onClick={ this.onPeopleClick } onMouseEnter={ this.onPeopleMouseEnter } onMouseLeave={ this.onPeopleMouseLeave } >
96113
<TintableSvg src="img/icons-people.svg" width="25" height="25" />

src/components/structures/RoomSubList.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,12 +368,12 @@ var RoomSubList = React.createClass({
368368

369369
makeRoomTiles: function() {
370370
var self = this;
371-
var RoomTile = sdk.getComponent("rooms.RoomTile");
371+
var DNDRoomTile = sdk.getComponent("rooms.DNDRoomTile");
372372
return this.state.sortedList.map(function(room) {
373373
var selected = room.roomId == self.props.selectedRoom;
374374
// XXX: is it evil to pass in self as a prop to RoomTile?
375375
return (
376-
<RoomTile
376+
<DNDRoomTile
377377
room={ room }
378378
roomSubList={ self }
379379
key={ room.roomId }

src/components/views/rooms/BottomLeftMenuTile.js

Lines changed: 0 additions & 57 deletions
This file was deleted.

src/components/views/rooms/RoomDNDView.js renamed to src/components/views/rooms/DNDRoomTile.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg');
2525
var sdk = require('matrix-react-sdk');
2626
var RoomTile = require('matrix-react-sdk/lib/components/views/rooms/RoomTile');
2727

28+
/**
29+
* Defines a new Component, DNDRoomTile that wraps RoomTile, making it draggable.
30+
* Requires extra props:
31+
* roomSubList: React.PropTypes.object.isRequired,
32+
* refreshSubList: React.PropTypes.func.isRequired,
33+
*/
34+
2835
/**
2936
* Specifies the drag source contract.
3037
* Only `beginDrag` function is required.
@@ -202,4 +209,3 @@ DragSource('RoomTile', roomTileSource, function(connect, monitor) {
202209
};
203210
})(RoomTile));
204211

205-
module.exports.replaces = 'RoomTile';

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ limitations under the License.
4848
.mx_ChatInviteDialog_queryList {
4949
position: absolute;
5050
background-color: #fff;
51-
width: 470px;
51+
width: 485px;
5252
max-height: 116px;
5353
overflow-y: scroll;
5454
border-radius: 3px;

src/skins/vector/css/matrix-react-sdk/views/rooms/MemberInfo.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,13 @@ limitations under the License.
7373
margin-left: 8px;
7474
line-height: 23px;
7575
}
76+
77+
.mx_MemberInfo_createRoom {
78+
cursor: pointer;
79+
}
80+
81+
.mx_MemberInfo_createRoom_label {
82+
width: 160px ! important;
83+
cursor: pointer;
84+
}
85+

src/skins/vector/css/matrix-react-sdk/views/rooms/RoomList.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ limitations under the License.
3535

3636
/* Make sure the scrollbar is above the sticky headers from RoomList */
3737
.mx_RoomList_scrollbar .gm-scrollbar.-vertical {
38-
z-index: 5;
38+
z-index: 6;
3939
}

src/skins/vector/css/matrix-react-sdk/views/rooms/RoomTile.css

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ limitations under the License.
3636
height: 24px;
3737
}
3838

39+
.mx_RightPanel .mx_RoomTile_nameContainer {
40+
width: 170px;
41+
}
42+
43+
.mx_RoomTile_avatar_container {
44+
position: relative;
45+
}
46+
3947
.mx_RoomTile_avatar {
4048
display: inline-block;
4149
padding-top: 5px;
@@ -47,6 +55,14 @@ limitations under the License.
4755
vertical-align: middle;
4856
}
4957

58+
.mx_RoomTile_dm {
59+
display: block;
60+
position: absolute;
61+
bottom: 0;
62+
right: -5px;
63+
z-index: 2;
64+
}
65+
5066
.mx_RoomTile:hover .mx_RoomTile_avatar_container:before,
5167
.mx_RoomTile_avatar_container.mx_RoomTile_avatar_roomTagMenu:before {
5268
display: block;
@@ -55,7 +71,6 @@ limitations under the License.
5571
border-radius: 40px;
5672
background-image: url("img/icons_ellipsis.svg");
5773
background-size: 25px;
58-
left: 15px;
5974
width: 24px;
6075
height: 24px;
6176
z-index: 4;
@@ -68,11 +83,11 @@ limitations under the License.
6883
content: "";
6984
border-radius: 40px;
7085
background: #4A4A4A;
71-
top: 5px;
86+
bottom: 0;
7287
width: 24px;
7388
height: 24px;
7489
opacity: 0.6;
75-
z-index: 2;
90+
z-index: 1;
7691
}
7792

7893
.collapsed .mx_RoomTile:hover .mx_RoomTile_avatar_container:before {

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ limitations under the License.
4949
flex: 1 1 0;
5050

5151
overflow-y: auto;
52-
z-index: 5;
52+
z-index: 6;
5353
}
5454

5555
.mx_LeftPanel.collapsed .mx_BottomLeftMenu {
56-
flex: 0 0 120px;
56+
flex: 0 0 160px;
5757
}
5858

5959
.mx_LeftPanel .mx_BottomLeftMenu {
@@ -79,13 +79,15 @@ limitations under the License.
7979
pointer-events: none;
8080
}
8181

82+
.mx_LeftPanel .mx_BottomLeftMenu_directory,
8283
.mx_LeftPanel .mx_BottomLeftMenu_createRoom,
8384
.mx_LeftPanel .mx_BottomLeftMenu_people,
8485
.mx_LeftPanel .mx_BottomLeftMenu_settings {
8586
display: inline-block;
8687
cursor: pointer;
8788
}
8889

90+
.collapsed .mx_BottomLeftMenu_directory,
8991
.collapsed .mx_BottomLeftMenu_createRoom,
9092
.collapsed .mx_BottomLeftMenu_people,
9193
.collapsed .mx_BottomLeftMenu_settings {
@@ -94,8 +96,16 @@ limitations under the License.
9496
padding-bottom: 3px ! important;
9597
}
9698

99+
.mx_LeftPanel .mx_BottomLeftMenu_directory {
100+
margin-right: 10px;
101+
}
102+
103+
.mx_LeftPanel .mx_BottomLeftMenu_createRoom {
104+
margin-right: 10px;
105+
}
106+
97107
.mx_LeftPanel .mx_BottomLeftMenu_people {
98-
margin-left: 10px;
108+
margin-right: 10px;
99109
}
100110

101111
.mx_LeftPanel .mx_BottomLeftMenu_settings {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ limitations under the License.
4646
.mx_RoomSubList_label.mx_RoomSubList_fixed {
4747
position: fixed;
4848
top: 0;
49-
z-index: 4;
49+
z-index: 5;
5050
/* pointer-events: none; */
5151
}
5252

src/skins/vector/img/icon_person.svg

Lines changed: 23 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)