mirror of https://github.com/vector-im/riot-web
Menu colour now changeable, and leave room item hooked up. Some additional CSS tweaks to fit current design changes
parent
f8fa19ed47
commit
9798e14733
|
@ -114,11 +114,21 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
_onClickLeave: function() {
|
_onClickLeave: function() {
|
||||||
// Leave room - tag room as 'Archive'?
|
// Leave room
|
||||||
|
dis.dispatch({
|
||||||
|
action: 'leave_room',
|
||||||
|
room_id: this.props.room.roomId,
|
||||||
|
});
|
||||||
|
|
||||||
|
// Close the context menu
|
||||||
|
if (this.props.onFinished) {
|
||||||
|
this.props.onFinished();
|
||||||
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
var cli = MatrixClientPeg.get();
|
var myUserId = MatrixClientPeg.get().credentials.userId;
|
||||||
|
var myMember = this.props.room.getMember(myUserId);
|
||||||
|
|
||||||
var favouriteClasses = classNames({
|
var favouriteClasses = classNames({
|
||||||
'mx_RoomTagContextMenu_field': true,
|
'mx_RoomTagContextMenu_field': true,
|
||||||
|
@ -151,7 +161,7 @@ module.exports = React.createClass({
|
||||||
Low Priority
|
Low Priority
|
||||||
</div>
|
</div>
|
||||||
<hr className="mx_RoomTagContextMenu_separator" />
|
<hr className="mx_RoomTagContextMenu_separator" />
|
||||||
<div className={ leaveClasses } onClick={this._onClickLeave} >
|
<div className={ leaveClasses } onClick={(myMember && myMember.membership === "join") ? this._onClickLeave : null} >
|
||||||
<img className="mx_RoomTagContextMenu_icon" src="img/icon_context_delete.svg" width="15" height="15" />
|
<img className="mx_RoomTagContextMenu_icon" src="img/icon_context_delete.svg" width="15" height="15" />
|
||||||
Leave
|
Leave
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -55,7 +55,7 @@ limitations under the License.
|
||||||
border-bottom: 8px solid transparent;
|
border-bottom: 8px solid transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_ContextualMenu_chevron_right:after{
|
.mx_ContextualMenu_chevron_right:after {
|
||||||
content:'';
|
content:'';
|
||||||
width: 0;
|
width: 0;
|
||||||
height: 0;
|
height: 0;
|
||||||
|
|
|
@ -16,8 +16,8 @@ limitations under the License.
|
||||||
|
|
||||||
.mx_SearchBox {
|
.mx_SearchBox {
|
||||||
height: 24px;
|
height: 24px;
|
||||||
margin-left: 18px;
|
margin-left: 16px;
|
||||||
margin-right: 18px;
|
margin-right: 16px;
|
||||||
padding-top: 24px;
|
padding-top: 24px;
|
||||||
padding-bottom: 22px;
|
padding-bottom: 22px;
|
||||||
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
||||||
|
|
|
@ -23,6 +23,7 @@ limitations under the License.
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
padding-top: 1px;
|
||||||
speak: none;
|
speak: none;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
|
|
@ -233,7 +233,7 @@ limitations under the License.
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_RoomHeader_button {
|
.mx_RoomHeader_button {
|
||||||
margin-left: 8px;
|
margin-left: 12px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,23 +19,23 @@ limitations under the License.
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
display: block;
|
display: block;
|
||||||
height: 34px;
|
height: 35px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_RoomTile_nameContainer {
|
.mx_RoomTile_nameContainer {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 180px;
|
width: 180px;
|
||||||
height: 24px;
|
height: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_RoomTile_avatar {
|
.mx_RoomTile_avatar {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
padding-left: 18px;
|
padding-left: 16px;
|
||||||
padding-right: 6px;
|
padding-right: 6px;
|
||||||
width: 24px;
|
width: 25px;
|
||||||
height: 24px;
|
height: 25px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,9 +47,9 @@ limitations under the License.
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
background-image: url("img/icons_ellipsis.svg");
|
background-image: url("img/icons_ellipsis.svg");
|
||||||
background-size: 25px;
|
background-size: 25px;
|
||||||
left: 17px;
|
left: 16px;
|
||||||
width: 24px;
|
width: 25px;
|
||||||
height: 24px;
|
height: 25px;
|
||||||
z-index: 4;
|
z-index: 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,8 +61,8 @@ limitations under the License.
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
background: #4A4A4A;
|
background: #4A4A4A;
|
||||||
top: 5px;
|
top: 5px;
|
||||||
width: 24px;
|
width: 25px;
|
||||||
height: 24px;
|
height: 25px;
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,13 +15,14 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.mx_RoomTagContextMenu_field {
|
.mx_RoomTagContextMenu_field {
|
||||||
padding-top: 8px;
|
padding-top: 10px;
|
||||||
padding-right: 20px;
|
padding-right: 20px;
|
||||||
padding-bottom: 8px;
|
padding-bottom: 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
line-height: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_RoomTagContextMenu_field:first-child {
|
.mx_RoomTagContextMenu_field:first-child {
|
||||||
|
|
Loading…
Reference in New Issue