mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2026-02-25 09:30:54 -08:00
feat: open developer tool detach to prevent overlap
This commit is contained in:
parent
fb6e895710
commit
cf87bf7bef
3 changed files with 2 additions and 4 deletions
|
|
@ -365,7 +365,7 @@ export default class ContextMenuBuilder {
|
|||
const inspect = new MenuItem({
|
||||
label: this.stringTable.developerTools(),
|
||||
click: () => {
|
||||
this.webContents.openDevTools();
|
||||
this.webContents.openDevTools({ mode: 'detach' });
|
||||
},
|
||||
});
|
||||
menu.append(inspect);
|
||||
|
|
|
|||
|
|
@ -349,8 +349,6 @@ export class View implements IViewService {
|
|||
didFailLoadErrorMessage: null,
|
||||
isLoading: true,
|
||||
});
|
||||
// DEBUG devTool
|
||||
// view.webContents.openDevTools({ mode: 'detach' });
|
||||
await view.webContents.loadURL(urlToLoad);
|
||||
logger.debug('loadUrlForView() await loadURL() done');
|
||||
const unregisterContextMenu = await this.menuService.initContextMenuForWindowWebContents(view.webContents);
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@ export class WorkspaceView implements IWorkspaceViewService {
|
|||
{
|
||||
label: () => i18n.t('Menu.DeveloperToolsActiveWorkspace'),
|
||||
accelerator: 'CmdOrCtrl+Option+I',
|
||||
click: async () => (await this.viewService.getActiveBrowserView())?.webContents?.openDevTools(),
|
||||
click: async () => (await this.viewService.getActiveBrowserView())?.webContents?.openDevTools?.({ mode: 'detach' }),
|
||||
enabled: hasWorkspaces,
|
||||
},
|
||||
]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue