Add failure notification
This commit is contained in:
parent
2ee4d0df48
commit
c31b2ddf9e
1 changed files with 2 additions and 0 deletions
|
@ -45,6 +45,8 @@ const serialConnection: Middleware<{}, RootState> = (state) => (next) => (action
|
|||
electron.ipcRenderer.send("asynchronous-message", "default");
|
||||
} else if (connectionFailure.match(action)) {
|
||||
electron.ipcRenderer.send("asynchronous-message", "red");
|
||||
const { Notification } = electron.remote;
|
||||
new Notification({ title: "Connection Failure", body: action.payload }).show();
|
||||
} else if (disconnect.match(action)) {
|
||||
serialPort?.close();
|
||||
state.dispatch(connectionEnd());
|
||||
|
|
Reference in a new issue