@@ -9,6 +9,7 @@ export const root = style({
|
|||||||
display: 'flex',
|
display: 'flex',
|
||||||
gap: 4,
|
gap: 4,
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
['WebkitAppRegion' as string]: 'drag',
|
||||||
});
|
});
|
||||||
|
|
||||||
export const affineIcon = style({
|
export const affineIcon = style({
|
||||||
|
|||||||
@@ -70,13 +70,11 @@ abstract class PopupWindow {
|
|||||||
|
|
||||||
async build(): Promise<BrowserWindow> {
|
async build(): Promise<BrowserWindow> {
|
||||||
const browserWindow = new BrowserWindow({
|
const browserWindow = new BrowserWindow({
|
||||||
...this.windowOptions,
|
|
||||||
resizable: false,
|
resizable: false,
|
||||||
minimizable: false,
|
minimizable: false,
|
||||||
maximizable: false,
|
maximizable: false,
|
||||||
closable: false,
|
closable: false,
|
||||||
alwaysOnTop: true,
|
alwaysOnTop: true,
|
||||||
focusable: false,
|
|
||||||
hiddenInMissionControl: true,
|
hiddenInMissionControl: true,
|
||||||
movable: false,
|
movable: false,
|
||||||
titleBarStyle: 'hidden',
|
titleBarStyle: 'hidden',
|
||||||
@@ -84,6 +82,7 @@ abstract class PopupWindow {
|
|||||||
backgroundColor: 'transparent',
|
backgroundColor: 'transparent',
|
||||||
visualEffectState: 'active',
|
visualEffectState: 'active',
|
||||||
vibrancy: 'under-window',
|
vibrancy: 'under-window',
|
||||||
|
...this.windowOptions,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
...this.windowOptions.webPreferences,
|
...this.windowOptions.webPreferences,
|
||||||
webgl: true,
|
webgl: true,
|
||||||
@@ -99,6 +98,9 @@ abstract class PopupWindow {
|
|||||||
|
|
||||||
// required to make the window transparent
|
// required to make the window transparent
|
||||||
browserWindow.setBackgroundColor('#00000000');
|
browserWindow.setBackgroundColor('#00000000');
|
||||||
|
browserWindow.setVisibleOnAllWorkspaces(true, {
|
||||||
|
visibleOnFullScreen: true,
|
||||||
|
});
|
||||||
|
|
||||||
browserWindow.loadURL(popupViewUrl).catch(err => logger.error(err));
|
browserWindow.loadURL(popupViewUrl).catch(err => logger.error(err));
|
||||||
browserWindow.on('ready-to-show', () => {
|
browserWindow.on('ready-to-show', () => {
|
||||||
@@ -199,6 +201,7 @@ class RecordingPopupWindow extends PopupWindow {
|
|||||||
windowOptions: Partial<BrowserWindowConstructorOptions> = {
|
windowOptions: Partial<BrowserWindowConstructorOptions> = {
|
||||||
width: RECORDING_SIZE[0],
|
width: RECORDING_SIZE[0],
|
||||||
height: RECORDING_SIZE[1],
|
height: RECORDING_SIZE[1],
|
||||||
|
movable: true,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -756,7 +756,7 @@ export class WebContentViewsManager {
|
|||||||
}, 100);
|
}, 100);
|
||||||
};
|
};
|
||||||
|
|
||||||
app.on('browser-window-focus', () => {
|
this.mainWindow?.on('focus', () => {
|
||||||
focusActiveView();
|
focusActiveView();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,14 @@ const PlayAndPauseIcon = ({
|
|||||||
const lottieRef: LottieRef = useRef(null);
|
const lottieRef: LottieRef = useRef(null);
|
||||||
const prevStateRef = useRef(state);
|
const prevStateRef = useRef(state);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!lottieRef.current) return;
|
||||||
|
const lottie = lottieRef.current;
|
||||||
|
if (prevStateRef.current === 'pause') {
|
||||||
|
lottie.goToAndStop(100, true);
|
||||||
|
}
|
||||||
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!lottieRef.current) return;
|
if (!lottieRef.current) return;
|
||||||
const lottie = lottieRef.current;
|
const lottie = lottieRef.current;
|
||||||
|
|||||||
Reference in New Issue
Block a user