- 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.
pull/8794/head REL-9_4
Aditya Toshniwal 2025-05-27 13:02:11 +05:30
parent e8826863e0
commit 7c74b7cdb7
8 changed files with 22 additions and 20 deletions

View File

@ -284,6 +284,7 @@ REM Main build sequence Ends
REM WGET REM WGET
FOR /f "tokens=*" %%i IN ('npm info electron version') DO SET "ELECTRON_VERSION=%%i" FOR /f "tokens=*" %%i IN ('npm info electron version') DO SET "ELECTRON_VERSION=%%i"
SET ELECTRON_VERSION="35.4.0"
:GET_NW :GET_NW
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" 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"
IF %ERRORLEVEL% NEQ 0 GOTO GET_NW IF %ERRORLEVEL% NEQ 0 GOTO GET_NW

View File

@ -140,6 +140,8 @@ _build_runtime() {
fi fi
ELECTRON_VERSION="$(npm info electron version)" ELECTRON_VERSION="$(npm info electron version)"
# Can't use the latest as it is not compatible with few OS versions.
ELECTRON_VERSION="35.4.0"
pushd "${BUILDROOT}" > /dev/null || exit pushd "${BUILDROOT}" > /dev/null || exit
while true;do while true;do

View File

@ -34,6 +34,7 @@ _build_runtime() {
fi fi
ELECTRON_VERSION="$(npm info electron version)" ELECTRON_VERSION="$(npm info electron version)"
ELECTRON_VERSION="35.4.0"
pushd "${BUILD_ROOT}" > /dev/null || exit pushd "${BUILD_ROOT}" > /dev/null || exit
while true;do while true;do

View File

@ -410,6 +410,7 @@ ipcMain.on('log', (_e, text) => ()=>{
misc.writeServerLog(text); misc.writeServerLog(text);
}); });
ipcMain.on('focus', (e) => { ipcMain.on('focus', (e) => {
app.focus({steal: true});
const callerWindow = BrowserWindow.fromWebContents(e.sender) const callerWindow = BrowserWindow.fromWebContents(e.sender)
if (callerWindow) { if (callerWindow) {
if (callerWindow.isMinimized()) callerWindow.restore(); if (callerWindow.isMinimized()) callerWindow.restore();

View File

@ -109,7 +109,7 @@
"date-fns": "^4.1.0", "date-fns": "^4.1.0",
"diff-arrays-of-objects": "^1.1.8", "diff-arrays-of-objects": "^1.1.8",
"hotkeys-js": "^3.13.3", "hotkeys-js": "^3.13.3",
"html-to-image": "1.11.13", "html-to-image": "1.11.11",
"immutability-helper": "^3.0.0", "immutability-helper": "^3.0.0",
"insert-if": "^1.1.0", "insert-if": "^1.1.0",
"ip-address": "^10.0.1", "ip-address": "^10.0.1",

View File

@ -8,7 +8,7 @@
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
import gettext from 'sources/gettext'; import gettext from 'sources/gettext';
import { Grid, FormHelperText } from '@mui/material'; import { FormHelperText, Box } from '@mui/material';
import React, { useMemo } from 'react'; import React, { useMemo } from 'react';
import {InputSelect } from './FormComponents'; import {InputSelect } from './FormComponents';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
@ -17,22 +17,21 @@ import HTMLReactParse from 'html-react-parser';
export default function SelectThemes({onChange, helpMessage, ...props}) { export default function SelectThemes({onChange, helpMessage, ...props}) {
const previewSrc = useMemo(()=>(props.options?.find((o)=>o.value==props.value)?.preview_src), [props.value]); const previewSrc = useMemo(()=>(props.options?.find((o)=>o.value==props.value)?.preview_src), [props.value]);
const cid = _.uniqueId('c'); const cid = _.uniqueId('c');
const helpid = `h${cid}`; const helpid = `h${cid}`;
return ( return (
<Grid container direction="column" spacing={0.5}> <>
<Grid size={{ lg: 12, md: 12, sm: 12, xs: 12 }}> <Box>
<InputSelect ref={props.inputRef} onChange={onChange} {...props} /> <InputSelect ref={props.inputRef} onChange={onChange} {...props} />
</Grid> </Box>
<Grid sx={{paddingTop: 10}} size={{ lg: 12, md: 12, sm: 12, xs: 12 }}> <Box>
{ previewSrc && <> { previewSrc && <>
<FormHelperText id={helpid} variant="outlined">{HTMLReactParse(helpMessage || '')}</FormHelperText> <FormHelperText id={helpid} variant="outlined">{HTMLReactParse(helpMessage || '')}</FormHelperText>
<img className='img-fluid mx-auto d-block border' src={previewSrc} alt={gettext('Preview not available...')} /> <img style={{display: 'block', margin: 'auto', paddingTop: '4px'}} src={previewSrc} alt={gettext('Preview not available...')} />
</> } </> }
</Grid> </Box>
</Grid> </>
); );
} }

View File

@ -168,8 +168,8 @@ function NotationForType({itype, width, rotation}) {
if(itype == 'many') { if(itype == 'many') {
return ( return (
<> <>
<circle className={['OneToMany-svgLink','OneToMany-svgLinkCircle'].join(' ')} cx="0" cy="16" r={width*2.5} strokeWidth={width} /> <circle className={['OneToMany-svgLink','OneToMany-svgLinkCircle'].join(' ')} cx="0" cy="16" r={width*2.5} />
<polyline className='OneToMany-svgLink' points="-8,0 0,15 0,0 0,30 0,15 8,0" fill="none" strokeWidth={width} /> <polyline className='OneToMany-svgLink' points="-8,0 0,15 0,0 0,30 0,15 8,0" fill="none" />
</> </>
); );
} else if (itype == 'one') { } else if (itype == 'one') {
@ -354,14 +354,12 @@ export class OneToManyLinkWidget extends RightAngleLinkWidget {
} }
} }
const LinkSegment = forwardRef(({model, selected, path, ...props}, ref)=>{ const LinkSegment = forwardRef(({selected, path, ...props}, ref)=>{
return ( return (
<path <path
ref={ref} ref={ref}
className={['OneToMany-svgLink','OneToMany-svgLinkPath', (selected ? 'OneToMany-svgLinkSelected' : '')].join(' ')} className={['OneToMany-svgLink','OneToMany-svgLinkPath', (selected ? 'OneToMany-svgLinkSelected' : '')].join(' ')}
stroke={model.getOptions().color}
strokeWidth={model.getOptions().width}
selected={selected} selected={selected}
d={path} d={path}
{...props} {...props}

View File

@ -8374,10 +8374,10 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"html-to-image@npm:1.11.13": "html-to-image@npm:1.11.11":
version: 1.11.13 version: 1.11.11
resolution: "html-to-image@npm:1.11.13" resolution: "html-to-image@npm:1.11.11"
checksum: 18da77cf6c1e7f821f320dc6941642ee292df136f38c548ecb77aa04718b979df63ba4ea56e53d1939b9dbe8e23ca10c44b55319a885bfe7f5f5023c1b5698fe checksum: b453beca72a697bf06fae4945e5460d1d9b1751e8569a0d721dda9485df1dde093938cc9bd9172b8df5fc23133a53a4d619777b3d22f7211cd8a67e3197ab4e8
languageName: node languageName: node
linkType: hard linkType: hard
@ -13667,7 +13667,7 @@ __metadata:
globals: ^16.1.0 globals: ^16.1.0
hotkeys-js: ^3.13.3 hotkeys-js: ^3.13.3
html-react-parser: ^5.2.0 html-react-parser: ^5.2.0
html-to-image: 1.11.13 html-to-image: 1.11.11
image-minimizer-webpack-plugin: ^4.0.2 image-minimizer-webpack-plugin: ^4.0.2
imagemin: ^9.0.0 imagemin: ^9.0.0
imagemin-mozjpeg: ^10.0.0 imagemin-mozjpeg: ^10.0.0