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