frpc-desktop/electron/api/common.ts

16 lines
343 B
TypeScript
Raw Normal View History

2024-08-11 16:54:01 +08:00
import {ipcMain, shell} from "electron";
import log from "electron-log";
export const initCommonApi = () => {
// 打开链接
ipcMain.on("common.openUrl", async (event, args) => {
if (args) {
log.info(`打开链接:${args}`)
shell.openExternal(args).then(() => {
});
}
})
}