feature/IO-3066-1-scaffolding: Minor cleanup, addition of idea project files.
This commit is contained in:
@@ -7,15 +7,15 @@ import ImportJob from "../decoder/decoder";
|
||||
import store from "../store/store";
|
||||
import { StartWatcher, StopWatcher } from "../watcher/watcher";
|
||||
import {
|
||||
SettingsPpcFilPathGet,
|
||||
SettingsPpcFilPathSet,
|
||||
SettingsPpcFilePathGet,
|
||||
SettingsPpcFilePathSet,
|
||||
SettingsWatchedFilePathsAdd,
|
||||
SettingsWatchedFilePathsGet,
|
||||
SettingsWatchedFilePathsRemove,
|
||||
SettingsWatcherPollingGet,
|
||||
SettingsWatcherPollingSet,
|
||||
SettingEmsOutFilPathSet,
|
||||
SettingEmsOutFilPathGet,
|
||||
SettingEmsOutFilePathSet,
|
||||
SettingEmsOutFilePathGet,
|
||||
} from "./ipcMainHandler.settings";
|
||||
import {
|
||||
ipcMainHandleAuthStateChanged,
|
||||
@@ -98,15 +98,15 @@ ipcMain.handle(
|
||||
SettingsWatcherPollingSet,
|
||||
);
|
||||
|
||||
ipcMain.handle(ipcTypes.toMain.settings.getPpcFilePath, SettingsPpcFilPathGet);
|
||||
ipcMain.handle(ipcTypes.toMain.settings.setPpcFilePath, SettingsPpcFilPathSet);
|
||||
ipcMain.handle(ipcTypes.toMain.settings.getPpcFilePath, SettingsPpcFilePathGet);
|
||||
ipcMain.handle(ipcTypes.toMain.settings.setPpcFilePath, SettingsPpcFilePathSet);
|
||||
ipcMain.handle(
|
||||
ipcTypes.toMain.settings.getEmsOutFilePath,
|
||||
SettingEmsOutFilPathGet,
|
||||
SettingEmsOutFilePathGet,
|
||||
);
|
||||
ipcMain.handle(
|
||||
ipcTypes.toMain.settings.setEmsOutFilePath,
|
||||
SettingEmsOutFilPathSet,
|
||||
SettingEmsOutFilePathSet,
|
||||
);
|
||||
|
||||
ipcMain.handle(ipcTypes.toMain.user.getActiveShop, () => {
|
||||
|
||||
@@ -1,14 +1,9 @@
|
||||
import { dialog, IpcMainInvokeEvent } from "electron";
|
||||
import {dialog, IpcMainInvokeEvent} from "electron";
|
||||
import log from "electron-log/main";
|
||||
import _ from "lodash";
|
||||
import Store from "../store/store";
|
||||
import { getMainWindow } from "../util/toRenderer";
|
||||
import {
|
||||
addWatcherPath,
|
||||
removeWatcherPath,
|
||||
StartWatcher,
|
||||
StopWatcher,
|
||||
} from "../watcher/watcher";
|
||||
import {getMainWindow} from "../util/toRenderer";
|
||||
import {addWatcherPath, removeWatcherPath, StartWatcher, StopWatcher,} from "../watcher/watcher";
|
||||
|
||||
const SettingsWatchedFilePathsAdd = async (): Promise<string[]> => {
|
||||
const mainWindow = getMainWindow();
|
||||
@@ -75,11 +70,10 @@ const SettingsWatcherPollingSet = async (
|
||||
|
||||
return { enabled, interval };
|
||||
};
|
||||
const SettingsPpcFilPathGet = async (): Promise<string> => {
|
||||
const ppcFilePath: string = Store.get("settings.ppcFilePath");
|
||||
return ppcFilePath;
|
||||
const SettingsPpcFilePathGet = async (): Promise<string> => {
|
||||
return Store.get("settings.ppcFilePath");
|
||||
};
|
||||
const SettingsPpcFilPathSet = async (): Promise<string> => {
|
||||
const SettingsPpcFilePathSet = async (): Promise<string> => {
|
||||
const mainWindow = getMainWindow();
|
||||
if (!mainWindow) {
|
||||
log.error("No main window found when trying to open dialog");
|
||||
@@ -95,12 +89,10 @@ const SettingsPpcFilPathSet = async (): Promise<string> => {
|
||||
|
||||
return (Store.get("settings.ppcFilePath") as string) || "";
|
||||
};
|
||||
|
||||
const SettingEmsOutFilPathGet = async (): Promise<string> => {
|
||||
const emsOutFilePath: string = Store.get("settings.emsOutFilePath");
|
||||
return emsOutFilePath;
|
||||
const SettingEmsOutFilePathGet = async (): Promise<string> => {
|
||||
return Store.get("settings.emsOutFilePath");
|
||||
};
|
||||
const SettingEmsOutFilPathSet = async (): Promise<string> => {
|
||||
const SettingEmsOutFilePathSet = async (): Promise<string> => {
|
||||
const mainWindow = getMainWindow();
|
||||
if (!mainWindow) {
|
||||
log.error("No main window found when trying to open dialog");
|
||||
@@ -118,13 +110,13 @@ const SettingEmsOutFilPathSet = async (): Promise<string> => {
|
||||
};
|
||||
|
||||
export {
|
||||
SettingsPpcFilPathGet,
|
||||
SettingsPpcFilPathSet,
|
||||
SettingsPpcFilePathGet,
|
||||
SettingsPpcFilePathSet,
|
||||
SettingsWatchedFilePathsAdd,
|
||||
SettingsWatchedFilePathsGet,
|
||||
SettingsWatchedFilePathsRemove,
|
||||
SettingsWatcherPollingGet,
|
||||
SettingsWatcherPollingSet,
|
||||
SettingEmsOutFilPathGet,
|
||||
SettingEmsOutFilPathSet,
|
||||
SettingEmsOutFilePathGet,
|
||||
SettingEmsOutFilePathSet,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user