notification panel WIP

This commit is contained in:
Matthew Hodgson 2016-08-23 14:27:58 +01:00
parent 9b5e5c9acb
commit f888ec6e81
1 changed files with 15 additions and 2 deletions

View File

@ -28,6 +28,7 @@ module.exports = React.createClass({
Phase : {
MemberList: 'MemberList',
FileList: 'FileList',
NotificationPanel: 'NotificationPanel',
MemberInfo: 'MemberInfo',
},
@ -108,12 +109,14 @@ module.exports = React.createClass({
render: function() {
var MemberList = sdk.getComponent('rooms.MemberList');
var NotificationPanel = sdk.getComponent('structures.NotificationPanel');
var TintableSvg = sdk.getComponent("elements.TintableSvg");
var buttonGroup;
var panel;
var filesHighlight;
var membersHighlight;
var notificationsHighlight;
if (!this.props.collapsed) {
if (this.state.phase == this.Phase.MemberList || this.state.phase === this.Phase.MemberInfo) {
membersHighlight = <div className="mx_RightPanel_headerButton_highlight"></div>;
@ -121,6 +124,9 @@ module.exports = React.createClass({
else if (this.state.phase == this.Phase.FileList) {
filesHighlight = <div className="mx_RightPanel_headerButton_highlight"></div>;
}
else if (this.state.phase == this.Phase.NotificationPanel) {
notificationsHighlight = <div className="mx_RightPanel_headerButton_highlight"></div>;
}
}
var membersBadge;
@ -144,6 +150,10 @@ module.exports = React.createClass({
<TintableSvg src="img/files.svg" width="17" height="22"/>
{ filesHighlight }
</div>
<div className="mx_RightPanel_headerButton mx_RightPanel_notificationbutton" title="Notifications">
<TintableSvg src="img/icons-notifications.svg" width="25" height="25"/>
{ notificationsHighlight }
</div>
</div>;
if (!this.props.collapsed) {
@ -154,6 +164,9 @@ module.exports = React.createClass({
var MemberInfo = sdk.getComponent('rooms.MemberInfo');
panel = <MemberInfo roomId={this.props.roomId} member={this.state.member} key={this.props.roomId} />
}
else if (this.state.phase == this.Phase.NotificationPanel) {
panel = <NotificationPanel />
}
}
}