mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07:00
webview devtools
This commit is contained in:
@@ -324,6 +324,23 @@ export class WebViewModel implements ViewModel {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
getSettingsMenuItems() {
|
||||
return [
|
||||
{
|
||||
label: this.webviewRef.current?.isDevToolsOpened() ? "Close DevTools" : "Open DevTools",
|
||||
click: async () => {
|
||||
if (this.webviewRef.current) {
|
||||
if (this.webviewRef.current.isDevToolsOpened()) {
|
||||
this.webviewRef.current.closeDevTools();
|
||||
} else {
|
||||
this.webviewRef.current.openDevTools();
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
function makeWebViewModel(blockId: string, nodeModel: NodeModel): WebViewModel {
|
||||
|
||||
Reference in New Issue
Block a user