feat(desktop-client): add web context menu for bound and workbench windows
Desktop Client Build / Resolve Build Metadata (push) Has been cancelled
Desktop Client Build / Build Desktop Client (push) Has been cancelled
Desktop Client Build / Publish Client Artifacts to NAS (push) Has been cancelled

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-24 22:39:01 +08:00
parent 0b5d8d72f2
commit c28f8218a3
3 changed files with 189 additions and 0 deletions
@@ -4,6 +4,7 @@ import type { Session, WebContents } from 'electron/main'
import { BrowserWindow, WebContentsView, ipcMain, nativeTheme } from 'electron/main'
import { STANDARD_USER_AGENT } from './user-agent'
import { attachWebContextMenu } from './web-context-menu'
interface WorkbenchWindowOptions {
title: string
@@ -817,6 +818,7 @@ export async function openWorkbenchWindow(options: WorkbenchWindowOptions): Prom
})
view.webContents.setUserAgent(STANDARD_USER_AGENT)
attachWebContextMenu(view.webContents)
window.contentView.addChildView(view)
const record: WorkbenchWindowRecord = {