overall v1
This commit is contained in:
@@ -162,6 +162,7 @@ app.whenReady().then(async () => {
|
||||
workerManager.startNetworkScannerWorker(UDP_PORT, TCP_PORT, 'login', 'uc_not_found', 'reset_database', path.join(pathToJsons, 'userConfig.json'), path.join(pathToJsons, 'application.json'));
|
||||
workerManager.startDirectoriesWatchersWorker(path.join(pathToJsons, 'memory.json'), path.join(pathToJsons, 'application.json'));
|
||||
workerManager.startServersWorker(HOST, UDP_PORT, TCP_PORT);
|
||||
|
||||
workerManager.startResourceCoordinatorWorker(
|
||||
path.join(pathToJsons, 'userConfig.json'),
|
||||
path.join(pathToJsons, 'application.json'),
|
||||
@@ -219,6 +220,11 @@ function registerIPCHandlers() {
|
||||
return await windowManager.showFileInExplorer(path);
|
||||
});
|
||||
|
||||
ipcMain.handle('close-announcement-window', async (_event: IpcMainInvokeEvent) => {
|
||||
if (!windowManager) throw new Error('WindowManager is not initialized.');
|
||||
return await windowManager.closeAnnouncementWindow();
|
||||
});
|
||||
|
||||
// TcpMethods IPC Handlers
|
||||
ipcMain.handle('open-socket', async (_event: IpcMainInvokeEvent) => {
|
||||
if (!applicationInfo) throw new Error('TcpMethods is not initialized.');
|
||||
|
||||
@@ -35,6 +35,7 @@ contextBridge.exposeInMainWorld('electronAPI', {
|
||||
selectDirectory: (): Promise<string | undefined> => ipcRenderer.invoke('select-directory'),
|
||||
selectFile: (): Promise<string | undefined> => ipcRenderer.invoke('select-file'),
|
||||
showFileInExplorer: (path: string): Promise<void> => ipcRenderer.invoke('show-file-in-explorer', path),
|
||||
closeAnnouncementWindow: (): Promise<void> => ipcRenderer.invoke('close-announcement-window'),
|
||||
|
||||
// Queue methods
|
||||
addTaskToSendFileQueue: (task: FileItemTask): Promise<void> => ipcRenderer.invoke('add-task-to-send-file-queue', task),
|
||||
|
||||
Reference in New Issue
Block a user