This commit is contained in:
Jiiks 2018-08-25 17:03:46 +03:00
parent 5e0c5e39f6
commit a4cbfd9235
2 changed files with 10 additions and 8 deletions

View File

@ -18,15 +18,16 @@ import { Toasts } from 'ui';
export default new class ReactDevtoolsModule extends BuiltinModule {
/* Getters */
get moduleName() { return 'ReactDevTools' }
get settingPath() { return ['core', 'advanced', 'react-devtools'] }
constructor() {
super();
this.devToolsOpened = this.devToolsOpened.bind(this);
}
get settingPath() {
return ['core', 'advanced', 'react-devtools'];
}
enabled(e) {
electron.remote.getCurrentWindow().webContents.on('devtools-opened', this.devToolsOpened);
if (electron.remote.getCurrentWindow().isDevToolsOpened) this.devToolsOpened();

View File

@ -18,15 +18,16 @@ import { Toasts } from 'ui';
export default new class VueDevtoolsModule extends BuiltinModule {
/* Getters */
get moduleName() { return 'VueDevTools' }
get settingPath() { return ['core', 'advanced', 'vue-devtools'] }
constructor() {
super();
this.devToolsOpened = this.devToolsOpened.bind(this);
}
get settingPath() {
return ['core', 'advanced', 'vue-devtools'];
}
enabled(e) {
electron.remote.getCurrentWindow().webContents.on('devtools-opened', this.devToolsOpened);
if (electron.remote.getCurrentWindow().isDevToolsOpened) this.devToolsOpened();