- Fix few SonarQube issues.

- Cleanup NW.js related stuff.
This commit is contained in:
Aditya Toshniwal
2024-07-02 10:34:30 +05:30
committed by GitHub
parent 3bb9f0ba8c
commit f8fa1cf6d6
23 changed files with 785 additions and 634 deletions

View File

@@ -107,7 +107,7 @@ export default class MainMenuFactory {
static refreshMainMenuItems(menu, menuItems) {
menu.setMenuItems(menuItems);
window.electronUI?.setMenus(MainMenuFactory.toElectron());
pgAdmin.Browser.Events.trigger('pgadmin:nw-refresh-menu-item', pgAdmin.Browser.MainMenus);
pgAdmin.Browser.Events.trigger('pgadmin:refresh-menu-item', pgAdmin.Browser.MainMenus);
}
static createMenuItem(options) {
@@ -130,10 +130,8 @@ export default class MainMenuFactory {
});
}
}}, (menu, item)=> {
pgAdmin.Browser.Events.trigger('pgadmin:nw-enable-disable-menu-items', menu, item);
pgAdmin.Browser.Events.trigger('pgadmin:enable-disable-menu-items', menu, item);
window.electronUI?.enableDisableMenuItems(menu?.serialize(), item?.serialize());
}, (item) => {
pgAdmin.Browser.Events.trigger('pgadmin:nw-update-checked-menu-item', item);
});
}

View File

@@ -920,7 +920,7 @@ define('pgadmin.browser', [
this.success = function() {
addItemNode();
}.bind(this);
};
// We can refresh the collection node, but - let's not bother about
// it right now.
this.notFound = errorOut;
@@ -961,7 +961,7 @@ define('pgadmin.browser', [
this.success = function() {
addItemNode();
}.bind(this);
};
// We can refresh the collection node, but - let's not bother about
// it right now.
this.notFound = errorOut;
@@ -1021,7 +1021,7 @@ define('pgadmin.browser', [
this.load = true;
this.success = function() {
addItemNode();
}.bind(this);
};
if (_d._type == this.old._type) {
// We were already searching the old object under the parent.
@@ -1423,7 +1423,7 @@ define('pgadmin.browser', [
});
}
});
}.bind(this);
};
if (n?.collection_node) {
let p = ctx.i = this.tree.parent(_i),