Added base handled for job decode and watcher start/top

This commit is contained in:
Patrick Fic
2020-10-14 11:26:10 -07:00
parent 953ea832e2
commit e7614942e5
25 changed files with 285 additions and 189 deletions

View File

@@ -0,0 +1,37 @@
import ipcTypes from "../ipc.types";
import {
setWatchedPaths,
setWatcherStatus,
} from "../redux/application/application.actions";
import { store } from "../redux/store";
const { ipcRenderer } = window;
console.log("----Initializing IPC Listeners in React App.");
ipcRenderer.on(
ipcTypes.default.fileWatcher.toRenderer.filepathsList,
(event, ...obj) => {
store.dispatch(setWatchedPaths(obj));
}
);
//Filewatcher Section
ipcRenderer.on(
ipcTypes.default.fileWatcher.toRenderer.startSuccess,
(event, ...obj) => {
store.dispatch(setWatcherStatus("READY!"));
}
);
ipcRenderer.on(
ipcTypes.default.fileWatcher.toRenderer.stopSuccess,
(event, ...obj) => {
store.dispatch(setWatcherStatus("STOPPED"));
}
);
ipcRenderer.on(
ipcTypes.default.fileWatcher.toRenderer.error,
(event, ...obj) => {
store.dispatch(setWatcherStatus(obj));
}
);