Skip to content
Snippets Groups Projects
Commit 0366e351 authored by Evelyn Eastmond's avatar Evelyn Eastmond
Browse files

Changing alert to 'peripheral error'.

parent 1822e82a
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
background: orange; background: orange;
height: 60px; height: 60px;
width: 300px; width: 300px;
line-height: 60px;
color: $ui-white;
z-index: 20; z-index: 20;
overflow: hidden; overflow: hidden;
box-shadow: 0px 5px 25px 5px $ui-black-transparent; box-shadow: 0px 5px 25px 5px $ui-black-transparent;
......
...@@ -37,7 +37,7 @@ const vmListenerHOC = function (WrappedComponent) { ...@@ -37,7 +37,7 @@ const vmListenerHOC = function (WrappedComponent) {
this.props.vm.on('TURBO_MODE_OFF', this.props.onTurboModeOff); this.props.vm.on('TURBO_MODE_OFF', this.props.onTurboModeOff);
this.props.vm.on('PROJECT_RUN_START', this.props.onProjectRunStart); this.props.vm.on('PROJECT_RUN_START', this.props.onProjectRunStart);
this.props.vm.on('PROJECT_RUN_STOP', this.props.onProjectRunStop); this.props.vm.on('PROJECT_RUN_STOP', this.props.onProjectRunStop);
this.props.vm.on('PERIPHERAL_CONNECTED', this.props.onShowAlert); this.props.vm.on('PERIPHERAL_ERROR', this.props.onShowAlert);
} }
componentDidMount () { componentDidMount () {
if (this.props.attachKeyboardEvents) { if (this.props.attachKeyboardEvents) {
...@@ -110,10 +110,10 @@ const vmListenerHOC = function (WrappedComponent) { ...@@ -110,10 +110,10 @@ const vmListenerHOC = function (WrappedComponent) {
onMonitorsUpdate: PropTypes.func.isRequired, onMonitorsUpdate: PropTypes.func.isRequired,
onProjectRunStart: PropTypes.func.isRequired, onProjectRunStart: PropTypes.func.isRequired,
onProjectRunStop: PropTypes.func.isRequired, onProjectRunStop: PropTypes.func.isRequired,
onShowAlert: PropTypes.func.isRequired,
onTargetsUpdate: PropTypes.func.isRequired, onTargetsUpdate: PropTypes.func.isRequired,
onTurboModeOff: PropTypes.func.isRequired, onTurboModeOff: PropTypes.func.isRequired,
onTurboModeOn: PropTypes.func.isRequired, onTurboModeOn: PropTypes.func.isRequired,
onViewAlert: PropTypes.func.isRequired,
username: PropTypes.string, username: PropTypes.string,
vm: PropTypes.instanceOf(VM).isRequired vm: PropTypes.instanceOf(VM).isRequired
}; };
......
...@@ -2,7 +2,7 @@ const CLOSE_ALERT = 'scratch-gui/alerts/CLOSE_ALERT'; ...@@ -2,7 +2,7 @@ const CLOSE_ALERT = 'scratch-gui/alerts/CLOSE_ALERT';
const SHOW_ALERT = 'scratch-gui/alerts/SHOW_ALERT'; const SHOW_ALERT = 'scratch-gui/alerts/SHOW_ALERT';
const initialState = { const initialState = {
message: 'testing alerts!!', message: 'Peripheral error',
visible: false visible: false
}; };
...@@ -15,7 +15,7 @@ const reducer = function (state, action) { ...@@ -15,7 +15,7 @@ const reducer = function (state, action) {
}); });
case CLOSE_ALERT: case CLOSE_ALERT:
return Object.assign({}, state, { return Object.assign({}, state, {
message: 'closing alert!' message: 'Closing alert!'
}); });
default: default:
return state; return state;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment