Creating processes

This commit is contained in:
James Barnsley
2017-04-05 20:28:41 +12:00
parent 14509e6c8b
commit f292e512dc
8 changed files with 65 additions and 28 deletions

View File

@ -74,12 +74,15 @@ class DebugInfo extends React.Component{
<div className="item">
Notifications: {this.props.ui.notifications ? Object.keys(this.props.ui.notifications).length : '0'}
</div>
<div className="item">
Processes: {this.props.ui.processes ? Object.keys(this.props.ui.processes).length : '0'}
</div>
<br />
<div className="item">
_testMode: {window._testMode ? 'on' : 'off'}
</div>
<div className="item">
Touch: {helpers.isTouchDevice() ? 'yes' : 'no'}
Touch: {helpers.isTouchDevice() ? 'on' : 'off'}
</div>
{this.renderLoadQueue()}
</div>

View File

@ -21,23 +21,23 @@ export default class Notifications extends React.Component{
switch (notification.type){
case 'shortcut':
return (
<div className="shortcut-notification" key={notification.id}>
<div className="shortcut-notification" key={notification.key}>
<FontAwesome name={notification.content} />
</div>
)
case 'loading':
case 'process':
return (
<div className="loading notification" key={notification.id}>
<FontAwesome name="close" className="close-button" onClick={ e => this.props.uiActions.cancelLoading(notification.id) } />
<div className="process notification" key={notification.key}>
<FontAwesome name="close" className="close-button" onClick={ e => this.props.uiActions.cancelProcess(notification.key) } />
{ notification.content }
</div>
)
default:
return (
<div className={notification.type+" notification"} key={notification.id}>
<FontAwesome name="close" className="close-button" onClick={ e => this.props.uiActions.removeNotification(notification.id) } />
<div className={notification.type+" notification"} key={notification.key}>
<FontAwesome name="close" className="close-button" onClick={ e => this.props.uiActions.removeNotification(notification.key) } />
{ notification.content }
</div>
)