Skip to content

Commit 6335d1b

Browse files
authored
Merge pull request #574 from bitfinexcom/staging
Release version 4.40.0
2 parents 14b03f2 + 35a988c commit 6335d1b

18 files changed

+788
-234
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [4.40.0] - 2025-12-17
11+
12+
### Added
13+
14+
- Implemented its own solution for alert windows for the electron app instead of the `electron-alert` lib usage for cases where we can't delegate alert maintenance to the main UI. PR: [bfx-report-electron#572](https://github.com/bitfinexcom/bfx-report-electron/pull/572)
15+
- Added `USDT0 (Plasma)` and `USDT0 (Polygon)` support in the `Symbol` filters and enhanced mapping flow to show all `active` currencies (even not presented in pairs) instead of the fixed exception list. PR: [bfx-report-ui#992](https://github.com/bitfinexcom/bfx-report-ui/pull/992)
16+
- Implemented `mtsUpdated` value representation in the `Updated At` column for the `Movements` report and also added this column support to the filters. PR: [bfx-report-ui#995](https://github.com/bitfinexcom/bfx-report-ui/pull/995)
17+
18+
### Changed
19+
20+
- Moved report emailing from `rest:ext:sendgrid` to `rest:core:mail` service. PRs: [bfx-report#456](https://github.com/bitfinexcom/bfx-report/pull/456), [bfx-report#457](https://github.com/bitfinexcom/bfx-report/pull/457)
21+
- Excluded 2FA login and password from the error report modal window for the electron app in case the bfx api is not available. PR: [bfx-report#458](https://github.com/bitfinexcom/bfx-report/pull/458)
22+
- Prevented changing params possibility (and related auto-refresh) during the initial sync for the complex reports that require synced data for calculation to avoid generation errors. PR: [bfx-report-ui#994](https://github.com/bitfinexcom/bfx-report-ui/pull/994)
23+
- Prevented `authToken` from being removed from the `URL` if it was available initially after the redirection, according to the specialized needs of the `Customer` Support team. PR: [bfx-report-ui#996](https://github.com/bitfinexcom/bfx-report-ui/pull/996)
24+
- Changed column filter title from `Columns` to `Columns Filter` for more clarity to the users. PR: [bfx-report-ui#997](https://github.com/bitfinexcom/bfx-report-ui/pull/997)
25+
- Removed fees sections from the web and app `Summary` due to deprecation. PR: [bfx-report-ui#998](https://github.com/bitfinexcom/bfx-report-ui/pull/998)
26+
27+
### Fixed
28+
29+
- Excluded current value from language dropdown. PR: [bfx-report-ui#991](https://github.com/bitfinexcom/bfx-report-ui/pull/991)
30+
- Fixed currently selected language displaying issue noted after the recent updates. PR: [bfx-report-ui#993](https://github.com/bitfinexcom/bfx-report-ui/pull/993)
31+
1032
## [4.39.0] - 2025-11-19
1133

1234
### Added

bfx-report-ui

Submodule bfx-report-ui updated 38 files

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bfx-report-electron",
3-
"version": "4.39.0",
3+
"version": "4.40.0",
44
"repository": "https://github.com/bitfinexcom/bfx-report-electron",
55
"description": "Reporting tool",
66
"author": "bitfinex.com",

src/error-manager/show-modal-dialog.js

Lines changed: 17 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,17 @@
11
'use strict'
22

3-
const { app, dialog, screen } = require('electron')
4-
const fs = require('fs')
5-
const path = require('path')
3+
const { app, dialog } = require('electron')
64
const { Converter } = require('showdown')
7-
const Alert = require('electron-alert')
8-
const { rootPath } = require('electron-root-path')
95
const i18next = require('i18next')
106

7+
const {
8+
createModalWindow
9+
} = require('../window-creators')
1110
const wins = require('../window-creators/windows')
1211
const spawn = require('../helpers/spawn')
13-
const getAlertCustomClassObj = require(
14-
'../helpers/get-alert-custom-class-obj'
15-
)
1612
const isMainWinAvailable = require(
1713
'../helpers/is-main-win-available'
1814
)
19-
const {
20-
closeAlert
21-
} = require('../modal-dialog-src/utils')
22-
const {
23-
WINDOW_EVENT_NAMES,
24-
addOnceProcEventHandler
25-
} = require('../window-creators/window-event-manager')
26-
const getUIFontsAsCSSString = require(
27-
'../helpers/get-ui-fonts-as-css-string'
28-
)
29-
const ThemeIpcChannelHandlers = require(
30-
'../window-creators/main-renderer-ipc-bridge/theme-ipc-channel-handlers'
31-
)
32-
33-
const mdStyle = fs.readFileSync(path.join(
34-
rootPath, 'node_modules', 'github-markdown-css/github-markdown.css'
35-
))
36-
const fontsStyle = getUIFontsAsCSSString()
37-
const themesStyle = fs.readFileSync(path.join(
38-
__dirname, '../window-creators/layouts/themes.css'
39-
))
40-
const alertStyle = fs.readFileSync(path.join(
41-
__dirname, '../modal-dialog-src/modal-dialog.css'
42-
))
43-
const alertScript = fs.readFileSync(path.join(
44-
__dirname, '../modal-dialog-src/modal-dialog.js'
45-
))
46-
47-
const fonts = `<style>${fontsStyle}</style>`
48-
const themes = `<style>${themesStyle}</style>`
49-
const mdS = `<style>${mdStyle}</style>`
50-
const style = `<style>${alertStyle}</style>`
51-
const script = `<script type="text/javascript">${alertScript}</script>`
52-
const sound = { freq: 'F2', type: 'triange', duration: 1.5 }
5315

5416
const converter = new Converter({
5517
tables: true,
@@ -59,120 +21,26 @@ const converter = new Converter({
5921
requireSpaceBeforeHeadingText: true
6022
})
6123

62-
const _fireAlert = (params) => {
24+
const _fireAlert = async (params) => {
6325
const {
6426
title = i18next.t('errorManager.errorModalDialog.title'),
6527
html = '',
66-
parentWin,
6728
hasNoParentWin
6829
} = params ?? {}
69-
const win = parentWin ?? wins.mainWindow
7030

71-
if (
72-
!hasNoParentWin &&
73-
!isMainWinAvailable(win)
74-
) {
75-
return { value: false }
76-
}
77-
78-
const {
79-
getCursorScreenPoint,
80-
getDisplayNearestPoint
81-
} = screen
82-
const {
83-
workArea
84-
} = getDisplayNearestPoint(getCursorScreenPoint())
85-
const { height: screenHeight } = workArea
86-
const maxHeight = Math.floor(screenHeight * 0.90)
87-
88-
const alert = new Alert([mdS, fonts, themes, style, script])
89-
90-
const eventHandlerCtx = addOnceProcEventHandler(
91-
WINDOW_EVENT_NAMES.CLOSED,
92-
() => closeAlert(alert),
93-
win
94-
)
95-
96-
const bwOptions = {
97-
frame: false,
98-
transparent: false,
99-
thickFrame: false,
100-
closable: false,
101-
hasShadow: false,
102-
backgroundColor: ThemeIpcChannelHandlers.getWindowBackgroundColor(),
103-
darkTheme: false,
104-
parent: win,
105-
modal: true,
106-
width: 600,
107-
webPreferences: {
108-
contextIsolation: false
109-
}
110-
}
111-
const swalOptions = {
112-
position: 'center',
113-
allowOutsideClick: false,
114-
customClass: getAlertCustomClassObj({
115-
htmlContainer: 'markdown-body'
116-
}),
117-
118-
icon: 'question',
119-
focusConfirm: true,
31+
const res = await createModalWindow({
32+
icon: 'error',
33+
title,
34+
text: html,
35+
textClassName: 'markdown-body',
12036
showConfirmButton: true,
121-
confirmButtonText: i18next.t('errorManager.errorModalDialog.confirmButtonText'),
37+
confirmButtonText: i18next
38+
.t('errorManager.errorModalDialog.confirmButtonText'),
12239
showCancelButton: true,
123-
cancelButtonText: i18next.t('common.cancelButtonText'),
124-
timerProgressBar: false,
125-
126-
...params,
127-
title,
128-
html,
129-
130-
willOpen: () => {
131-
if (
132-
!alert ||
133-
!alert.browserWindow
134-
) return
40+
cancelButtonText: i18next.t('common.cancelButtonText')
41+
}, { hasNoParentWin, height: 600 })
13542

136-
alert.browserWindow.hide()
137-
},
138-
didOpen: () => {
139-
if (
140-
!alert ||
141-
!alert.browserWindow
142-
) return
143-
144-
alert.browserWindow.show()
145-
const { height } = alert.browserWindow
146-
.getContentBounds()
147-
alert.browserWindow.setBounds({
148-
height: height > maxHeight
149-
? maxHeight
150-
: height
151-
})
152-
},
153-
willClose: () => {
154-
if (
155-
!alert ||
156-
!alert.browserWindow
157-
) return
158-
159-
alert.browserWindow.hide()
160-
},
161-
didClose: () => {
162-
eventHandlerCtx.removeListener()
163-
}
164-
}
165-
166-
const res = alert.fire(
167-
swalOptions,
168-
bwOptions,
169-
null,
170-
true,
171-
false,
172-
sound
173-
)
174-
175-
return res
43+
return res?.modalRes ?? {}
17644
}
17745

17846
module.exports = async (params) => {
@@ -207,13 +75,11 @@ module.exports = async (params) => {
20775
) {
20876
const html = converter.makeHtml(mdIssue)
20977

210-
const {
211-
value
212-
} = await _fireAlert({ html, ...alertOpts })
78+
const res = await _fireAlert({ html, ...alertOpts })
21379

21480
return {
21581
isExit: false,
216-
isReported: value
82+
isReported: res?.dismiss === 'confirm'
21783
}
21884
}
21985

src/initialize-app.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ const ThemeIpcChannelHandlers = require(
2121
const AutoUpdateIpcChannelHandlers = require(
2222
'./window-creators/main-renderer-ipc-bridge/auto-update-ipc-channel-handlers'
2323
)
24+
const ModalIpcChannelHandlers = require(
25+
'./window-creators/main-renderer-ipc-bridge/modal-ipc-channel-handlers'
26+
)
2427
const triggerSyncAfterUpdates = require('./trigger-sync-after-updates')
2528
const triggerElectronLoad = require('./trigger-electron-load')
2629
const runServer = require('./run-server')
@@ -168,7 +171,8 @@ module.exports = async () => {
168171
TranslationIpcChannelHandlers,
169172
MenuIpcChannelHandlers,
170173
ThemeIpcChannelHandlers,
171-
AutoUpdateIpcChannelHandlers
174+
AutoUpdateIpcChannelHandlers,
175+
ModalIpcChannelHandlers
172176
)
173177

174178
app.disableHardwareAcceleration()

0 commit comments

Comments
 (0)