feat(electron): recording popup ux (#11403)

fix AF-2444, AF-2443
This commit is contained in:
pengx17
2025-04-02 14:17:52 +00:00
parent 2adb8e1404
commit 90c3c4bf7f
4 changed files with 15 additions and 3 deletions

View File

@@ -70,13 +70,11 @@ abstract class PopupWindow {
async build(): Promise<BrowserWindow> {
const browserWindow = new BrowserWindow({
...this.windowOptions,
resizable: false,
minimizable: false,
maximizable: false,
closable: false,
alwaysOnTop: true,
focusable: false,
hiddenInMissionControl: true,
movable: false,
titleBarStyle: 'hidden',
@@ -84,6 +82,7 @@ abstract class PopupWindow {
backgroundColor: 'transparent',
visualEffectState: 'active',
vibrancy: 'under-window',
...this.windowOptions,
webPreferences: {
...this.windowOptions.webPreferences,
webgl: true,
@@ -99,6 +98,9 @@ abstract class PopupWindow {
// required to make the window transparent
browserWindow.setBackgroundColor('#00000000');
browserWindow.setVisibleOnAllWorkspaces(true, {
visibleOnFullScreen: true,
});
browserWindow.loadURL(popupViewUrl).catch(err => logger.error(err));
browserWindow.on('ready-to-show', () => {
@@ -199,6 +201,7 @@ class RecordingPopupWindow extends PopupWindow {
windowOptions: Partial<BrowserWindowConstructorOptions> = {
width: RECORDING_SIZE[0],
height: RECORDING_SIZE[1],
movable: true,
};
}

View File

@@ -756,7 +756,7 @@ export class WebContentViewsManager {
}, 100);
};
app.on('browser-window-focus', () => {
this.mainWindow?.on('focus', () => {
focusActiveView();
});