mirror of
https://github.com/xxnuo/MTranServer.git
synced 2026-06-05 05:39:20 +08:00
12 lines
687 B
JavaScript
12 lines
687 B
JavaScript
import { ipcMain } from 'electron';
|
|
|
|
export function registerIpcHandlers(handlers) {
|
|
ipcMain.handle('desktop:get-config', async () => handlers.getConfig());
|
|
ipcMain.handle('desktop:apply-config', async (_event, config) => handlers.applyConfig(config));
|
|
ipcMain.handle('desktop:reset-config', async () => handlers.resetConfig());
|
|
ipcMain.handle('desktop:restart-server', async () => handlers.restartServer());
|
|
ipcMain.handle('desktop:get-status', async () => handlers.getStatus());
|
|
ipcMain.handle('desktop:open-external', async (_event, url) => handlers.openExternal(url));
|
|
ipcMain.handle('desktop:open-path', async (_event, targetPath) => handlers.openPath(targetPath));
|
|
}
|