mirror of
https://github.com/imsyy/SPlayer.git
synced 2025-11-25 03:14:57 +08:00
16 lines
446 B
TypeScript
16 lines
446 B
TypeScript
import { ipcMain } from "electron";
|
|
import { checkUpdate, startDownloadUpdate } from "../update";
|
|
import mainWindow from "../windows/main-window";
|
|
|
|
const initUpdateIpc = () => {
|
|
const mainWin = mainWindow.getWin();
|
|
|
|
// 检查更新
|
|
ipcMain.on("check-update", (_event, showTip) => checkUpdate(mainWin!, showTip));
|
|
|
|
// 开始下载更新
|
|
ipcMain.on("start-download-update", () => startDownloadUpdate());
|
|
};
|
|
|
|
export default initUpdateIpc;
|