Skip to content

Commit 7c74b7c

Browse files
- Pin Electron to v35.4.0 as the v36 is not working on many OS.
- Pin html-to-image to v1.11.11 as latest version breaks ERD image downloads.
1 parent e882686 commit 7c74b7c

8 files changed

Lines changed: 22 additions & 20 deletions

File tree

Make.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ REM Main build sequence Ends
284284

285285
REM WGET
286286
FOR /f "tokens=*" %%i IN ('npm info electron version') DO SET "ELECTRON_VERSION=%%i"
287+
SET ELECTRON_VERSION="35.4.0"
287288
:GET_NW
288289
wget https://github.com/electron/electron/releases/download/v%ELECTRON_VERSION%/electron-v%ELECTRON_VERSION%-win32-x64.zip -O "%TMPDIR%\electron-v%ELECTRON_VERSION%-win32-x64.zip"
289290
IF %ERRORLEVEL% NEQ 0 GOTO GET_NW

pkg/linux/build-functions.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ _build_runtime() {
140140
fi
141141

142142
ELECTRON_VERSION="$(npm info electron version)"
143+
# Can't use the latest as it is not compatible with few OS versions.
144+
ELECTRON_VERSION="35.4.0"
143145

144146
pushd "${BUILDROOT}" > /dev/null || exit
145147
while true;do

pkg/mac/build-functions.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ _build_runtime() {
3434
fi
3535

3636
ELECTRON_VERSION="$(npm info electron version)"
37+
ELECTRON_VERSION="35.4.0"
3738

3839
pushd "${BUILD_ROOT}" > /dev/null || exit
3940
while true;do

runtime/src/js/pgadmin.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,7 @@ ipcMain.on('log', (_e, text) => ()=>{
410410
misc.writeServerLog(text);
411411
});
412412
ipcMain.on('focus', (e) => {
413+
app.focus({steal: true});
413414
const callerWindow = BrowserWindow.fromWebContents(e.sender)
414415
if (callerWindow) {
415416
if (callerWindow.isMinimized()) callerWindow.restore();

web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
"date-fns": "^4.1.0",
110110
"diff-arrays-of-objects": "^1.1.8",
111111
"hotkeys-js": "^3.13.3",
112-
"html-to-image": "1.11.13",
112+
"html-to-image": "1.11.11",
113113
"immutability-helper": "^3.0.0",
114114
"insert-if": "^1.1.0",
115115
"ip-address": "^10.0.1",

web/pgadmin/static/js/components/SelectThemes.jsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//////////////////////////////////////////////////////////////
99

1010
import gettext from 'sources/gettext';
11-
import { Grid, FormHelperText } from '@mui/material';
11+
import { FormHelperText, Box } from '@mui/material';
1212
import React, { useMemo } from 'react';
1313
import {InputSelect } from './FormComponents';
1414
import PropTypes from 'prop-types';
@@ -17,22 +17,21 @@ import HTMLReactParse from 'html-react-parser';
1717

1818

1919
export default function SelectThemes({onChange, helpMessage, ...props}) {
20-
2120
const previewSrc = useMemo(()=>(props.options?.find((o)=>o.value==props.value)?.preview_src), [props.value]);
2221
const cid = _.uniqueId('c');
2322
const helpid = `h${cid}`;
2423
return (
25-
<Grid container direction="column" spacing={0.5}>
26-
<Grid size={{ lg: 12, md: 12, sm: 12, xs: 12 }}>
24+
<>
25+
<Box>
2726
<InputSelect ref={props.inputRef} onChange={onChange} {...props} />
28-
</Grid>
29-
<Grid sx={{paddingTop: 10}} size={{ lg: 12, md: 12, sm: 12, xs: 12 }}>
27+
</Box>
28+
<Box>
3029
{ previewSrc && <>
3130
<FormHelperText id={helpid} variant="outlined">{HTMLReactParse(helpMessage || '')}</FormHelperText>
32-
<img className='img-fluid mx-auto d-block border' src={previewSrc} alt={gettext('Preview not available...')} />
31+
<img style={{display: 'block', margin: 'auto', paddingTop: '4px'}} src={previewSrc} alt={gettext('Preview not available...')} />
3332
</> }
34-
</Grid>
35-
</Grid>
33+
</Box>
34+
</>
3635
);
3736
}
3837

web/pgadmin/tools/erd/static/js/erd_tool/links/OneToManyLink.jsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ function NotationForType({itype, width, rotation}) {
168168
if(itype == 'many') {
169169
return (
170170
<>
171-
<circle className={['OneToMany-svgLink','OneToMany-svgLinkCircle'].join(' ')} cx="0" cy="16" r={width*2.5} strokeWidth={width} />
172-
<polyline className='OneToMany-svgLink' points="-8,0 0,15 0,0 0,30 0,15 8,0" fill="none" strokeWidth={width} />
171+
<circle className={['OneToMany-svgLink','OneToMany-svgLinkCircle'].join(' ')} cx="0" cy="16" r={width*2.5} />
172+
<polyline className='OneToMany-svgLink' points="-8,0 0,15 0,0 0,30 0,15 8,0" fill="none" />
173173
</>
174174
);
175175
} else if (itype == 'one') {
@@ -354,14 +354,12 @@ export class OneToManyLinkWidget extends RightAngleLinkWidget {
354354
}
355355
}
356356

357-
const LinkSegment = forwardRef(({model, selected, path, ...props}, ref)=>{
357+
const LinkSegment = forwardRef(({selected, path, ...props}, ref)=>{
358358

359359
return (
360360
<path
361361
ref={ref}
362362
className={['OneToMany-svgLink','OneToMany-svgLinkPath', (selected ? 'OneToMany-svgLinkSelected' : '')].join(' ')}
363-
stroke={model.getOptions().color}
364-
strokeWidth={model.getOptions().width}
365363
selected={selected}
366364
d={path}
367365
{...props}

web/yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8374,10 +8374,10 @@ __metadata:
83748374
languageName: node
83758375
linkType: hard
83768376

8377-
"html-to-image@npm:1.11.13":
8378-
version: 1.11.13
8379-
resolution: "html-to-image@npm:1.11.13"
8380-
checksum: 18da77cf6c1e7f821f320dc6941642ee292df136f38c548ecb77aa04718b979df63ba4ea56e53d1939b9dbe8e23ca10c44b55319a885bfe7f5f5023c1b5698fe
8377+
"html-to-image@npm:1.11.11":
8378+
version: 1.11.11
8379+
resolution: "html-to-image@npm:1.11.11"
8380+
checksum: b453beca72a697bf06fae4945e5460d1d9b1751e8569a0d721dda9485df1dde093938cc9bd9172b8df5fc23133a53a4d619777b3d22f7211cd8a67e3197ab4e8
83818381
languageName: node
83828382
linkType: hard
83838383

@@ -13667,7 +13667,7 @@ __metadata:
1366713667
globals: ^16.1.0
1366813668
hotkeys-js: ^3.13.3
1366913669
html-react-parser: ^5.2.0
13670-
html-to-image: 1.11.13
13670+
html-to-image: 1.11.11
1367113671
image-minimizer-webpack-plugin: ^4.0.2
1367213672
imagemin: ^9.0.0
1367313673
imagemin-mozjpeg: ^10.0.0

0 commit comments

Comments
 (0)