remote testing on dev env and nodeintegration on webview

This commit is contained in:
child_duckling 2022-02-19 00:34:15 -08:00
parent 7fe0be8c16
commit 2991a92b68
3 changed files with 24 additions and 3 deletions

View file

@ -657,7 +657,12 @@ export class BrowserWindow {
ipcMain.on('get-remote-pair-url', (_event, _) => {
let url = `http://${BrowserWindow.getIP()}:${this.remotePort}`;
BrowserWindow.win.webContents.send('send-remote-pair-url', (`https://cider.sh/pair-remote?url=${Buffer.from(encodeURI(url)).toString('base64')}`).toString());
if (app.isPackaged) {
BrowserWindow.win.webContents.send('send-remote-pair-url', (`https://cider.sh/pair-remote?url=${Buffer.from(encodeURI(url)).toString('base64')}`).toString());
} else {
BrowserWindow.win.webContents.send('send-remote-pair-url', (`http://127.0.0.1:5500/pair-remote.html?url=${Buffer.from(encodeURI(url)).toString('base64')}`).toString());
}
});
if (process.platform === "darwin") {
app.setUserActivity('com.CiderCollective.remote.pair', {