mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-23 14:42:03 +03:00
parent
8bf0458ef4
commit
24bf1beac8
@ -258,7 +258,9 @@ export async function openUrlInHiddenWindow(urlObj: URL) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (environment.isDebug) {
|
if (environment.isDebug) {
|
||||||
win.webContents.openDevTools();
|
win.webContents.openDevTools({
|
||||||
|
mode: 'detach',
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
win.on('close', e => {
|
win.on('close', e => {
|
||||||
|
@ -815,7 +815,9 @@ export class WebContentViewsManager {
|
|||||||
|
|
||||||
view.webContents.loadURL(shellViewUrl).catch(logger.error);
|
view.webContents.loadURL(shellViewUrl).catch(logger.error);
|
||||||
if (isDev) {
|
if (isDev) {
|
||||||
view.webContents.openDevTools();
|
view.webContents.openDevTools({
|
||||||
|
mode: 'detach',
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -999,13 +1001,17 @@ export const showDevTools = (id?: string) => {
|
|||||||
getCustomThemeWindow()
|
getCustomThemeWindow()
|
||||||
.then(w => {
|
.then(w => {
|
||||||
if (w && w.isFocused()) {
|
if (w && w.isFocused()) {
|
||||||
w.webContents.openDevTools();
|
w.webContents.openDevTools({
|
||||||
|
mode: 'detach',
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
const view = id
|
const view = id
|
||||||
? WebContentViewsManager.instance.getViewById(id)
|
? WebContentViewsManager.instance.getViewById(id)
|
||||||
: WebContentViewsManager.instance.activeWorkbenchView;
|
: WebContentViewsManager.instance.activeWorkbenchView;
|
||||||
if (view) {
|
if (view) {
|
||||||
view.webContents.openDevTools();
|
view.webContents.openDevTools({
|
||||||
|
mode: 'detach',
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user