mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-17 14:27:02 +08:00
feat(electron): enable vscode debugger for electron (#9333)
This commit is contained in:
@@ -88,6 +88,10 @@ export class DesktopApiService extends Service {
|
||||
}
|
||||
|
||||
private setupCommonUIEvents() {
|
||||
if (this.api.appInfo.windowName !== 'main') {
|
||||
return;
|
||||
}
|
||||
|
||||
const handleMaximized = (maximized: boolean | undefined) => {
|
||||
document.documentElement.dataset.maximized = String(maximized);
|
||||
};
|
||||
@@ -102,12 +106,13 @@ export class DesktopApiService extends Service {
|
||||
.isFullScreen()
|
||||
.then(handleFullscreen)
|
||||
.catch(console.error);
|
||||
|
||||
this.api.events.ui.onMaximized(handleMaximized);
|
||||
this.api.events.ui.onFullScreen(handleFullscreen);
|
||||
|
||||
const tabId = this.api.appInfo.viewId;
|
||||
|
||||
if (tabId && this.api.appInfo.windowName === 'main') {
|
||||
if (tabId) {
|
||||
let isActive = false;
|
||||
const handleActiveTabChange = (active: boolean) => {
|
||||
isActive = active;
|
||||
|
||||
Reference in New Issue
Block a user