MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / moveAboutMenuToTop

Function moveAboutMenuToTop

runtime/src/js/menu.js:103–111  ·  view source on GitHub ↗
(pgadminMenus, menuFile)

Source from the content-addressed store, hash-verified

101
102// Remove About pgAdmin 4 from help menu and add it to the top of menuFile submenu.
103function moveAboutMenuToTop(pgadminMenus, menuFile) {
104 const helpMenu = pgadminMenus.find((menu) => menu.name == 'help');
105 if (!helpMenu) return;
106 const aboutItem = helpMenu.submenu.find((item) => item.name === 'mnu_about');
107 if (!aboutItem) return;
108 helpMenu.submenu = helpMenu.submenu.filter((item) => item.name !== 'mnu_about');
109 menuFile.submenu.unshift(aboutItem);
110 menuFile.submenu.splice(2, 0, { type: 'separator' });
111}
112
113// Builds the application menu template and binds menu click events.
114// Handles platform-specific menu structure and dynamic menu items.

Callers 1

buildMenuFunction · 0.85

Calls 2

findMethod · 0.80
filterMethod · 0.80

Tested by

no test coverage detected