Skip to content

Commit

Permalink
add qr code gen on show qr code
Browse files Browse the repository at this point in the history
  • Loading branch information
willwade committed Nov 1, 2024
1 parent 3fbb623 commit 6a71382
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion nodejs/sender-monitor/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,13 @@ function attemptConnection() {

function updateTrayMenu() {
const contextMenu = Menu.buildFromTemplate([
{ label: "Show QR Code", click: () => createQRWindow(displayAppURL) },
{
label: "Show QR Code",
click: async () => {
const qrDataUrl = await QRCode.toDataURL(displayAppURL); // Generate a fresh QR code
createQRWindow(qrDataUrl);
}
},
{
label: "Reconnect",
click: manualReconnect,
Expand Down

0 comments on commit 6a71382

Please sign in to comment.