diff --git a/ac-electron/main.js b/ac-electron/main.js index d2471ea4c..6b2a961fb 100644 --- a/ac-electron/main.js +++ b/ac-electron/main.js @@ -775,7 +775,12 @@ function createSystemTray() { iconPath = path.join(__dirname, 'build', 'icons', 'trayTemplate.png'); } } else { - iconPath = path.join(__dirname, 'build', 'icons', '16x16.png'); + // Windows/Linux - use packaged icon in production + if (app.isPackaged) { + iconPath = path.join(process.resourcesPath, 'tray-icon.png'); + } else { + iconPath = path.join(__dirname, 'build', 'icons', '16x16.png'); + } } console.log('[main] Loading tray icon from:', iconPath); @@ -884,6 +889,21 @@ function rebuildTrayMenu() { click: () => openDevWindow() }); + // Quick DevTools access (especially for Windows) + menuItems.push({ + label: 'Open DevTools', + accelerator: 'F12', + click: () => { + const win = BrowserWindow.getFocusedWindow() || BrowserWindow.getAllWindows()[0]; + if (win) { + // Try to open webview devtools if flip-view + win.webContents.send('open-devtools'); + // Also open main window devtools + win.webContents.openDevTools({ mode: 'detach' }); + } + } + }); + menuItems.push({ type: 'separator' }); // Edit section diff --git a/ac-electron/package.json b/ac-electron/package.json index a2af0d4d6..37ee840ce 100644 --- a/ac-electron/package.json +++ b/ac-electron/package.json @@ -1,6 +1,6 @@ { "name": "aesthetic-computer", - "version": "0.1.20", + "version": "0.1.21", "description": "Aesthetic Computer", "homepage": "https://aesthetic.computer", "author": "Aesthetic Computer ", @@ -45,6 +45,10 @@ { "from": "build/icons/trayTemplate@2x.png", "to": "trayTemplate@2x.png" + }, + { + "from": "build/icons/16x16.png", + "to": "tray-icon.png" } ], "mac": { diff --git a/ac-electron/renderer/flip-view.html b/ac-electron/renderer/flip-view.html index b9c95a665..5a9e7e83a 100644 --- a/ac-electron/renderer/flip-view.html +++ b/ac-electron/renderer/flip-view.html @@ -970,6 +970,19 @@ }, 5000); }); + // Handle IPC from main process to open devtools + ipcRenderer.on('open-devtools', () => { + console.log('[flip] Received open-devtools from main'); + webviewEl.openDevTools(); + }); + + // Handle context menu on webview (right-click) + webviewEl.addEventListener('context-menu', (e) => { + console.log('[flip] Webview context-menu event', e.params); + e.preventDefault(); + showContextMenu(e.params.x, e.params.y); + }); + // Handle window.open() from webview (prompt.mjs + and - commands) // Note: Main process also handles this via setWindowOpenHandler webviewEl.addEventListener('new-window', (e) => { diff --git a/system/public/aesthetic.computer/lib/disk.mjs b/system/public/aesthetic.computer/lib/disk.mjs index 090d8d549..d97f19870 100644 --- a/system/public/aesthetic.computer/lib/disk.mjs +++ b/system/public/aesthetic.computer/lib/disk.mjs @@ -8817,6 +8817,8 @@ async function load( currentHUDButton = undefined; currentHUDScrub = 0; currentHUDLeftPad = 0; + currentHUDQR = null; // Reset QR code when loading new piece + currentHUDQRCells = null; // currentPromptButton = undefined; // Push last piece to a history list, skipping prompt and repeats. @@ -12740,7 +12742,8 @@ async function makeFrame({ data: { type, content } }) { const qrCells = currentHUDQRCells; const qrSize = qrCells.length; const qrBorder = 1; - const qrX = 0; + // Position QR after the left padding (share button space) so it appears at the visible left edge + const qrX = currentHUDLeftPad; const qrY = 1; // Slight offset from top // White background with minimal border