| | |
| | | if (BrowserWindow.getAllWindows().length === 0) |
| | | createWindow(); |
| | | }); |
| | | ipcMain.on("open-new-window", () => { |
| | | ipcMain.on("open-new-window", (event, meet) => { |
| | | const { meetName, id } = JSON.parse(meet); |
| | | const childWin = new BrowserWindow({ |
| | | width, |
| | | height, |
| | |
| | | }); |
| | | childWin.maximize(); |
| | | if (process.env.VITE_DEV_SERVER_URL) { |
| | | childWin.loadURL(process.env.VITE_DEV_SERVER_URL + "#/meet"); |
| | | childWin.loadURL(process.env.VITE_DEV_SERVER_URL + `#/meet?meetName=${meetName}&id=${id}`); |
| | | } else { |
| | | childWin.loadFile(join(__dirname, "../dist/index.html"), { |
| | | hash: "/meet" |
| | | hash: "/meet", |
| | | query: { |
| | | meetName, |
| | | id |
| | | } |
| | | }); |
| | | } |
| | | }); |