From d4e27be2615d3a9c451122f534cd9f463513a937 Mon Sep 17 00:00:00 2001 From: child_duckling <19170969+child-duckling@users.noreply.github.com> Date: Fri, 21 Jan 2022 23:27:48 -0800 Subject: [PATCH] [web-remote] better spot for qr code --- src/main/base/win.ts | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/main/base/win.ts b/src/main/base/win.ts index 0e7151ec..5817b078 100644 --- a/src/main/base/win.ts +++ b/src/main/base/win.ts @@ -424,21 +424,16 @@ export class Win { } //QR Code - electron.ipcMain.handle('setRemoteQR', async (event , _) => { - let url = await qrcode2.toDataURL(`http://${getIp()}:${this.remotePort}`) - return url; + electron.ipcMain.handle('showQR', async (event , _) => { + let url = `http://${getIp()}:${this.remotePort}`; + electron.shell.openExternal(`https://cider.sh/pair-remote?url=${btoa(encodeURI(url))}`); + /* + * Doing this because we can give them the link and let them send it via Pocket or another in-browser tool -q + / }) - - //Remote URL - electron.ipcMain.handle('setRemoteURL', async (event , _) => { - let url = `http://${getIp()}:${this.remotePort}` - return await url; - }) - /* ********************************************************************************************* * Window Events * **********************************************************************************************/ - if (process.platform === "win32") { let WND_STATE = { MINIMIZED: 0,