diff --git a/runtime/src/js/pgadmin.js b/runtime/src/js/pgadmin.js index d981bc0f345..5355ea62c53 100644 --- a/runtime/src/js/pgadmin.js +++ b/runtime/src/js/pgadmin.js @@ -31,6 +31,9 @@ let startPageUrl = null; let serverCheckUrl = null; let pgAdminMainScreen = null; +let configureWindow = null, + viewLogWindow = null; + let serverPort = 5050; let appStartTime = (new Date()).getTime(); const __dirname = path.dirname(fileURLToPath(import.meta.url)); @@ -77,7 +80,8 @@ contextMenu({ Menu.setApplicationMenu(null); function openConfigure() { - const win = new BrowserWindow({ + if (configureWindow === null){ + configureWindow = new BrowserWindow({ show: false, width: 600, height: 580, @@ -88,11 +92,12 @@ function openConfigure() { preload: path.join(__dirname, 'other_preload.js'), }, }); - win.loadFile('./src/html/configure.html'); - win.once('ready-to-show', ()=>{ - win.show(); + configureWindow.loadFile('./src/html/configure.html'); + configureWindow.once('ready-to-show', ()=>{ + configureWindow.show(); }); } +} function showErrorDialog(intervalID) { if(!splashWindow.isVisible()) { @@ -304,21 +309,23 @@ function launchPgAdminWindow() { setupMenu(pgAdminMainScreen, { 'view_logs': ()=>{ - const win = new BrowserWindow({ - show: false, - width: 800, - height: 460, - position: 'center', - resizable: false, - icon: '../../assets/pgAdmin4.png', - webPreferences: { - preload: path.join(__dirname, 'other_preload.js'), - }, - }); - win.loadFile('./src/html/view_log.html'); - win.once('ready-to-show', ()=>{ - win.show(); - }); + if(viewLogWindow === null){ + viewLogWindow = new BrowserWindow({ + show: false, + width: 800, + height: 460, + position: 'center', + resizable: false, + icon: '../../assets/pgAdmin4.png', + webPreferences: { + preload: path.join(__dirname, 'other_preload.js'), + }, + }); + viewLogWindow.loadFile('./src/html/view_log.html'); + viewLogWindow.once('ready-to-show', ()=>{ + viewLogWindow.show(); + }); + } }, 'configure': openConfigure, 'reloadApp': reloadApp, diff --git a/web/pgadmin/about/static/js/about.js b/web/pgadmin/about/static/js/about.js index d2740dcd24c..6a4f7effe8a 100644 --- a/web/pgadmin/about/static/js/about.js +++ b/web/pgadmin/about/static/js/about.js @@ -43,7 +43,7 @@ class About { pgAdmin.Browser.notifier.showModal(gettext('About %s', pgAdmin.Browser.utils.app_name), () => { return ; }, { isFullScreen: false, isResizeable: true, showFullScreen: true, - isFullWidth: true, dialogWidth: dlgWidth, dialogHeight: dlgHeight, minHeight: dlgHeight + isFullWidth: true, dialogWidth: dlgWidth, dialogHeight: dlgHeight, minHeight: dlgHeight, id:'id-about' }); } } diff --git a/web/pgadmin/browser/static/js/constants.js b/web/pgadmin/browser/static/js/constants.js index fb3ee89dfbd..882e85e613a 100644 --- a/web/pgadmin/browser/static/js/constants.js +++ b/web/pgadmin/browser/static/js/constants.js @@ -46,6 +46,7 @@ export const BROWSER_PANELS = { WELCOME_PSQL_TOOL: 'id-welcome-psql' }; + export const WORKSPACES = { DEFAULT: 'default_workspace', QUERY_TOOL: 'query_tool_workspace', diff --git a/web/pgadmin/preferences/static/js/components/PreferencesComponent.jsx b/web/pgadmin/preferences/static/js/components/PreferencesComponent.jsx index 69de97acdf2..9f05bcdbde3 100644 --- a/web/pgadmin/preferences/static/js/components/PreferencesComponent.jsx +++ b/web/pgadmin/preferences/static/js/components/PreferencesComponent.jsx @@ -689,7 +689,6 @@ export default function PreferencesComponent({ ...props }) { const text = `${gettext('All preferences will be reset to their default values.')}

${gettext('Do you want to proceed?')}

${gettext('Note:')}
`; - pgAdmin.Browser.notifier.showModal( gettext('Reset all preferences'), (closeModal)=>{ @@ -710,7 +709,7 @@ ${gettext('Note:')}