Browse Source

show spinner

all-modes
pbca26 8 years ago
parent
commit
8e569142d5
  1. 50
      react/src/components/dashboard/notifications/notifications.render.js

50
react/src/components/dashboard/notifications/notifications.render.js

@ -88,33 +88,29 @@ export const NotificationsModalRender = function() {
};
export const NotificationsRender = function() {
if (this.state.debug) {
return (
<div>
<div
className={ this.props.Dashboard.activeHandle && this.props.Dashboard.activeHandle.status === 'unlocked' ? 'notifications-badge stick-to-top' : 'notifications-badge' }
onClick={ this.toggleNotificationsModal }>
<span className="badge success">
{ this.state.calls.success }
</span>
<span className="badge error">
{ this.state.calls.error }
</span>
<span className="badge pending">
{ this.state.calls.pending }
</span>
<div className={ this.state.calls.pending === 0 ? 'spinner spinner-hide' : 'spinner' }>
<div className="rect1"></div>
<div className="rect2"></div>
<div className="rect3"></div>
<div className="rect4"></div>
<div className="rect5"></div>
</div>
return (
<div>
<div
className={ this.props.Dashboard.activeHandle && this.props.Dashboard.activeHandle.status === 'unlocked' ? 'notifications-badge stick-to-top' : 'notifications-badge' }
onClick={ this.state.debug ? this.toggleNotificationsModal : null }>
<span className={ this.state.debug ? 'badge success' : 'hide' }>
{ this.state.calls.success }
</span>
<span className={ this.state.debug ? 'badge error' : 'hide' }>
{ this.state.calls.error }
</span>
<span className={ this.state.debug ? 'badge pending' : 'hide' }>
{ this.state.calls.pending }
</span>
<div className={ this.state.calls.pending === 0 ? 'spinner spinner-hide' : 'spinner' }>
<div className="rect1"></div>
<div className="rect2"></div>
<div className="rect3"></div>
<div className="rect4"></div>
<div className="rect5"></div>
</div>
{ this.renderNotificationsModal() }
</div>
);
} else {
return null;
}
{ this.renderNotificationsModal() }
</div>
);
};
Loading…
Cancel
Save