mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed blank screen issue on windows and also made changes to use NWjs manifest for remembering window size. Fixes #6419
This commit is contained in:
parent
b30a42ab9e
commit
092f830c3c
@ -22,6 +22,7 @@ Bug fixes
|
|||||||
*********
|
*********
|
||||||
|
|
||||||
| `Issue #5849 <https://redmine.postgresql.org/issues/5849>`_ - Ensure that trigger function SQL should have 'create or replace function' instead of 'create function' only.
|
| `Issue #5849 <https://redmine.postgresql.org/issues/5849>`_ - Ensure that trigger function SQL should have 'create or replace function' instead of 'create function' only.
|
||||||
|
| `Issue #6419 <https://redmine.postgresql.org/issues/6419>`_ - Fixed blank screen issue on windows and also made changes to use NWjs manifest for remembering window size.
|
||||||
| `Issue #6531 <https://redmine.postgresql.org/issues/6531>`_ - Fixed the export image issue where relation lines are over the nodes.
|
| `Issue #6531 <https://redmine.postgresql.org/issues/6531>`_ - Fixed the export image issue where relation lines are over the nodes.
|
||||||
| `Issue #6544 <https://redmine.postgresql.org/issues/6544>`_ - Fixed width limitation issue in PSQL tool window.
|
| `Issue #6544 <https://redmine.postgresql.org/issues/6544>`_ - Fixed width limitation issue in PSQL tool window.
|
||||||
| `Issue #6564 <https://redmine.postgresql.org/issues/6564>`_ - Fixed an issue where columns with sequences get altered unnecessarily with a schema diff tool.
|
| `Issue #6564 <https://redmine.postgresql.org/issues/6564>`_ - Fixed an issue where columns with sequences get altered unnecessarily with a schema diff tool.
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^6.3.0",
|
"eslint": "^6.3.0",
|
||||||
"nw": "^0.50.2"
|
"nw": "^0.55.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"linter": "yarn eslint --no-eslintrc -c .eslintrc.js --ext .js ."
|
"linter": "yarn eslint --no-eslintrc -c .eslintrc.js --ext .js ."
|
||||||
|
@ -365,34 +365,9 @@ let ConfigureStore = {
|
|||||||
jsonData: {},
|
jsonData: {},
|
||||||
|
|
||||||
init: function() {
|
init: function() {
|
||||||
// Initialize the Screen.
|
|
||||||
let screen_obj = nw.Screen.Init();
|
|
||||||
// Minimum resolution support
|
|
||||||
let screen_height = 480;
|
|
||||||
let screen_width = 640;
|
|
||||||
|
|
||||||
// if screen_obj is not null and have at least one element then get the
|
|
||||||
// height and width of the work area.
|
|
||||||
if (screen_obj !== null && screen_obj !== undefined &&
|
|
||||||
screen_obj.screens.length > 0) {
|
|
||||||
screen_height = screen_obj.screens[0]['work_area']['height'] - 100;
|
|
||||||
screen_width = screen_obj.screens[0]['work_area']['width'] - 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this.readConfig()){
|
if (!this.readConfig()){
|
||||||
this.jsonData = DEFAULT_CONFIG_DATA;
|
this.jsonData = DEFAULT_CONFIG_DATA;
|
||||||
this.jsonData['windowHeight'] = screen_height;
|
|
||||||
this.jsonData['windowWidth'] = screen_width;
|
|
||||||
this.saveConfig();
|
this.saveConfig();
|
||||||
} else {
|
|
||||||
// Check if stored window height and width is greater then the
|
|
||||||
// actual screen height and width, set the screen height and width.
|
|
||||||
if (ConfigureStore.get('windowHeight') > screen_height ||
|
|
||||||
ConfigureStore.get('windowWidth') > screen_width) {
|
|
||||||
this.set('windowHeight', screen_height);
|
|
||||||
this.set('windowWidth', screen_width);
|
|
||||||
this.saveConfig();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -201,18 +201,14 @@ function startDesktopMode() {
|
|||||||
function launchPgAdminWindow() {
|
function launchPgAdminWindow() {
|
||||||
// Create and launch new window and open pgAdmin url
|
// Create and launch new window and open pgAdmin url
|
||||||
misc.writeServerLog('Application Server URL: ' + startPageUrl);
|
misc.writeServerLog('Application Server URL: ' + startPageUrl);
|
||||||
let winWidth = misc.ConfigureStore.get('windowWidth');
|
|
||||||
let winHeight = misc.ConfigureStore.get('windowHeight');
|
|
||||||
|
|
||||||
nw.Window.open(startPageUrl, {
|
nw.Window.open(startPageUrl, {
|
||||||
|
'id': 'pgadmin-main',
|
||||||
'icon': '../../assets/pgAdmin4.png',
|
'icon': '../../assets/pgAdmin4.png',
|
||||||
'frame': true,
|
'frame': true,
|
||||||
'width': winWidth,
|
|
||||||
'height': winHeight,
|
|
||||||
'position': 'center',
|
'position': 'center',
|
||||||
'resizable': true,
|
'resizable': true,
|
||||||
'min_width': 400,
|
'min_width': 640,
|
||||||
'min_height': 200,
|
'min_height': 480,
|
||||||
'focus': true,
|
'focus': true,
|
||||||
'show': false,
|
'show': false,
|
||||||
}, (pgadminWindow)=> {
|
}, (pgadminWindow)=> {
|
||||||
@ -232,19 +228,21 @@ function launchPgAdminWindow() {
|
|||||||
// set up handler for new-win-policy event.
|
// set up handler for new-win-policy event.
|
||||||
// Set the width and height for the new window.
|
// Set the width and height for the new window.
|
||||||
pgadminWindow.on('new-win-policy', function(frame, url, policy) {
|
pgadminWindow.on('new-win-policy', function(frame, url, policy) {
|
||||||
policy.setNewWindowManifest({
|
if(!frame) {
|
||||||
'icon': '../../assets/pgAdmin4.png',
|
policy.setNewWindowManifest({
|
||||||
'frame': true,
|
'id': 'pgadmin-tools',
|
||||||
'width': winWidth,
|
'icon': '../../assets/pgAdmin4.png',
|
||||||
'height': winHeight,
|
'frame': true,
|
||||||
'position': 'center',
|
'position': 'center',
|
||||||
});
|
'min_width': 640,
|
||||||
|
'min_height': 480,
|
||||||
|
'width': pgadminWindow.width,
|
||||||
|
'height': pgadminWindow.height,
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
pgadminWindow.on('loaded', function() {
|
pgadminWindow.on('loaded', function() {
|
||||||
// Hide the splash screen
|
|
||||||
splashWindow.hide();
|
|
||||||
|
|
||||||
/* Make the new window opener to null as it is
|
/* Make the new window opener to null as it is
|
||||||
* nothing but a splash screen. We will have to make it null,
|
* nothing but a splash screen. We will have to make it null,
|
||||||
* so that open in new browser tab will work.
|
* so that open in new browser tab will work.
|
||||||
@ -254,26 +252,9 @@ function launchPgAdminWindow() {
|
|||||||
// Show new window
|
// Show new window
|
||||||
pgadminWindow.show();
|
pgadminWindow.show();
|
||||||
pgadminWindow.focus();
|
pgadminWindow.focus();
|
||||||
});
|
|
||||||
|
|
||||||
pgadminWindow.on('resize', function(width, height) {
|
// Hide the splash screen
|
||||||
// Set the width and height for the new window on resize.
|
splashWindow.hide();
|
||||||
pgadminWindow.on('new-win-policy', function(frame, url, policy) {
|
|
||||||
policy.setNewWindowManifest({
|
|
||||||
'icon': '../../assets/pgAdmin4.png',
|
|
||||||
'frame': true,
|
|
||||||
'width': width,
|
|
||||||
'height': height,
|
|
||||||
'position': 'center',
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// No need to write setting in case of full screen
|
|
||||||
if (!pgadminWindow.isFullscreen) {
|
|
||||||
misc.ConfigureStore.set('windowWidth', width);
|
|
||||||
misc.ConfigureStore.set('windowHeight', height);
|
|
||||||
misc.ConfigureStore.saveConfig();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
pgadminWindow.on('blur', function() {
|
pgadminWindow.on('blur', function() {
|
||||||
|
@ -1008,10 +1008,10 @@ number-is-nan@^1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
|
resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
|
||||||
integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=
|
integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=
|
||||||
|
|
||||||
nw@^0.50.2:
|
nw@^0.55.0:
|
||||||
version "0.50.2"
|
version "0.55.0"
|
||||||
resolved "https://registry.yarnpkg.com/nw/-/nw-0.50.2.tgz#9947e7aa0d8f7fa6e4bca2c262ea7605db1ab507"
|
resolved "https://registry.yarnpkg.com/nw/-/nw-0.55.0.tgz#fd5785c40fde1391ea558a73c2efff0c9e8cde3c"
|
||||||
integrity sha512-5Y3VDaRooA7C/aSm6Bm4lOM4cg+rceS7OTlrfiQFNiop2/b6ip7OIpRVKPmeOzQ2/M+pKJqzEZLnVdeLl/wWFg==
|
integrity sha512-/EYsT55LJraJCZeSCpJoXnftsLtR+8lbhEXABlhye/n+0//F+v9kYsGLbnC+SS3JN7NQksnv/WcnoLVjL1WXcg==
|
||||||
dependencies:
|
dependencies:
|
||||||
chalk "~1.1.3"
|
chalk "~1.1.3"
|
||||||
decompress "^4.2.0"
|
decompress "^4.2.0"
|
||||||
|
Loading…
Reference in New Issue
Block a user