/** * App IPC Handlers * 处理应用级别信息 */ import { ipcMain, app } from 'electron' // IPC channel names export const APP_CHANNELS = { GET_VERSION: 'app:getVersion', GET_DOWNLOADS_PATH: 'app:getDownloadsPath', } as const export function registerAppIPCHandlers(): void { // Get app version ipcMain.handle(APP_CHANNELS.GET_VERSION, () => { return app.getVersion() }) // Get downloads directory path ipcMain.handle(APP_CHANNELS.GET_DOWNLOADS_PATH, () => { return app.getPath('downloads') }) }