Add BrowserView tab system and overlay menu for desktop mode

Introduces a BrowserView-based tab management system for desktop mode, replacing webview elements for tab content. Adds IPC handlers and state management for creating, activating, destroying, and communicating with BrowserViews. Implements an overlay menu popup window for tab actions and zoom controls. Updates renderer UI to use a dedicated view host container, and refactors tab creation and navigation logic to use BrowserViews. Improves focus styling in CSS and updates preload and IPC messaging to support BrowserView contexts.
This commit is contained in:
2026-01-19 20:57:24 +13:00
parent 03a99b7d46
commit a0e76e623d
9 changed files with 1010 additions and 600 deletions
+7 -2
View File
@@ -1912,10 +1912,15 @@ function navigateTo(url) {
webview.style.width = '100%';
webview.style.height = '100%';
webview.style.border = 'none';
webview.preload = '../preload.js';
const preloadPath = window.electronAPI?.getWebviewPreloadPath?.();
if (preloadPath) {
webview.setAttribute('preload', preloadPath);
} else {
webview.setAttribute('preload', '../preload.js');
}
webview.partition = 'persist:main';
webview.allowpopups = true;
webview.webpreferences = 'allowRunningInsecureContent=false,javascript=true,webSecurity=true';
webview.setAttribute('webpreferences', 'allowRunningInsecureContent=false,javascript=true,webSecurity=true');
container.appendChild(webview);
state.currentWebview = webview;