forked from matrix/element-web
notification panel WIP
This commit is contained in:
parent
9b5e5c9acb
commit
f888ec6e81
|
@ -28,6 +28,7 @@ module.exports = React.createClass({
|
||||||
Phase : {
|
Phase : {
|
||||||
MemberList: 'MemberList',
|
MemberList: 'MemberList',
|
||||||
FileList: 'FileList',
|
FileList: 'FileList',
|
||||||
|
NotificationPanel: 'NotificationPanel',
|
||||||
MemberInfo: 'MemberInfo',
|
MemberInfo: 'MemberInfo',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -108,12 +109,14 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
var MemberList = sdk.getComponent('rooms.MemberList');
|
var MemberList = sdk.getComponent('rooms.MemberList');
|
||||||
|
var NotificationPanel = sdk.getComponent('structures.NotificationPanel');
|
||||||
var TintableSvg = sdk.getComponent("elements.TintableSvg");
|
var TintableSvg = sdk.getComponent("elements.TintableSvg");
|
||||||
var buttonGroup;
|
var buttonGroup;
|
||||||
var panel;
|
var panel;
|
||||||
|
|
||||||
var filesHighlight;
|
var filesHighlight;
|
||||||
var membersHighlight;
|
var membersHighlight;
|
||||||
|
var notificationsHighlight;
|
||||||
if (!this.props.collapsed) {
|
if (!this.props.collapsed) {
|
||||||
if (this.state.phase == this.Phase.MemberList || this.state.phase === this.Phase.MemberInfo) {
|
if (this.state.phase == this.Phase.MemberList || this.state.phase === this.Phase.MemberInfo) {
|
||||||
membersHighlight = <div className="mx_RightPanel_headerButton_highlight"></div>;
|
membersHighlight = <div className="mx_RightPanel_headerButton_highlight"></div>;
|
||||||
|
@ -121,6 +124,9 @@ module.exports = React.createClass({
|
||||||
else if (this.state.phase == this.Phase.FileList) {
|
else if (this.state.phase == this.Phase.FileList) {
|
||||||
filesHighlight = <div className="mx_RightPanel_headerButton_highlight"></div>;
|
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;
|
var membersBadge;
|
||||||
|
@ -144,16 +150,23 @@ module.exports = React.createClass({
|
||||||
<TintableSvg src="img/files.svg" width="17" height="22"/>
|
<TintableSvg src="img/files.svg" width="17" height="22"/>
|
||||||
{ filesHighlight }
|
{ filesHighlight }
|
||||||
</div>
|
</div>
|
||||||
|
<div className="mx_RightPanel_headerButton mx_RightPanel_notificationbutton" title="Notifications">
|
||||||
|
<TintableSvg src="img/icons-notifications.svg" width="25" height="25"/>
|
||||||
|
{ notificationsHighlight }
|
||||||
|
</div>
|
||||||
</div>;
|
</div>;
|
||||||
|
|
||||||
if (!this.props.collapsed) {
|
if (!this.props.collapsed) {
|
||||||
if(this.state.phase == this.Phase.MemberList) {
|
if (this.state.phase == this.Phase.MemberList) {
|
||||||
panel = <MemberList roomId={this.props.roomId} key={this.props.roomId} />
|
panel = <MemberList roomId={this.props.roomId} key={this.props.roomId} />
|
||||||
}
|
}
|
||||||
else if(this.state.phase == this.Phase.MemberInfo) {
|
else if (this.state.phase == this.Phase.MemberInfo) {
|
||||||
var MemberInfo = sdk.getComponent('rooms.MemberInfo');
|
var MemberInfo = sdk.getComponent('rooms.MemberInfo');
|
||||||
panel = <MemberInfo roomId={this.props.roomId} member={this.state.member} key={this.props.roomId} />
|
panel = <MemberInfo roomId={this.props.roomId} member={this.state.member} key={this.props.roomId} />
|
||||||
}
|
}
|
||||||
|
else if (this.state.phase == this.Phase.NotificationPanel) {
|
||||||
|
panel = <NotificationPanel />
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue