Skip to content

Release version 4.36.0 #537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 36 commits into from
May 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
7925dde
Add window names
ZIMkaRU Apr 22, 2025
cca576a
Add window names to win storage
ZIMkaRU Apr 22, 2025
fa249f2
Specify setting parent window for startup
ZIMkaRU Apr 22, 2025
a11199c
Add ipc method for startup loading window
ZIMkaRU Apr 23, 2025
7b29bcc
Register startup loading window methods to preload script
ZIMkaRU Apr 23, 2025
2660ac0
Add layout for startup loading window
ZIMkaRU Apr 23, 2025
1f51e5f
Add layout for common loading window
ZIMkaRU Apr 23, 2025
96e5961
Clean up app init loading window
ZIMkaRU Apr 23, 2025
f04baab
Provide ability to set loading description for both loading wins
ZIMkaRU Apr 23, 2025
c9f6252
Adjust import db module for new loading win
ZIMkaRU Apr 23, 2025
47dbd83
Adjust export db module for new loading win
ZIMkaRU Apr 23, 2025
fcfadbc
Provide ability to show loading window for both loading wins
ZIMkaRU Apr 24, 2025
b2f7298
Add ability to create both loading windows
ZIMkaRU Apr 24, 2025
6b03fc2
Provide ability to hide loading window for both loading wins
ZIMkaRU Apr 24, 2025
1c331aa
Hide both loading wins in case error win creation
ZIMkaRU Apr 24, 2025
9d199c4
Adjust showing loading win for enforce-macos-app-location module
ZIMkaRU Apr 25, 2025
ecfe028
Adjust showing loading win for auto-updater module
ZIMkaRU Apr 25, 2025
84bd97d
Adjust showing loading win for export-db module
ZIMkaRU Apr 25, 2025
7d90b6c
Adjust showing loading win for pause-app module
ZIMkaRU Apr 25, 2025
89fbb45
Fix showing loading window
ZIMkaRU Apr 25, 2025
454d01d
Adjust hiding loading win for initialize-app module
ZIMkaRU Apr 25, 2025
2e0fc04
Adjust hiding loading win for enforce-macos-app-location module
ZIMkaRU Apr 25, 2025
6256f3d
Adjust hiding loading win for export-db module
ZIMkaRU Apr 25, 2025
48d314e
Adjust hiding loading win for auto-updater module
ZIMkaRU Apr 25, 2025
96b355b
Add loading win styles into separate file
ZIMkaRU Apr 28, 2025
ef20140
Add loading win styles to startup loading win layout
ZIMkaRU Apr 28, 2025
08066fc
Add loading win styles to common loading win layout
ZIMkaRU Apr 28, 2025
bc2844f
Add loading win script into separate file
ZIMkaRU Apr 28, 2025
2b5a88d
Add loading win script to startup loading win layout
ZIMkaRU Apr 28, 2025
8d05eee
Add loading win script to common loading win layout
ZIMkaRU Apr 28, 2025
d05bf61
Fix loading win for enforcing macos app location
ZIMkaRU Apr 29, 2025
93c7b5a
Merge pull request #535 from ZIMkaRU/feature/make-two-loading-wins-fo…
ezewer May 6, 2025
98651e0
Bump version up to v4.36.0
ZIMkaRU May 13, 2025
87d67ca
Add changelog for v4.36.0
ZIMkaRU May 13, 2025
b64cb12
Update sub-modules
ZIMkaRU May 13, 2025
8bddda9
Merge pull request #536 from ZIMkaRU/feature/release-electron-app
ezewer May 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [4.36.0] - 2025-05-14

### Added

- Added `package-lock` file, bumped dev dependencies and bumped up `NODEJS` to `v20` for the `GH Actions`. PR: [bfx-facs-db-better-sqlite#12](https://github.com/bitfinexcom/bfx-facs-db-better-sqlite/pull/12)
- Implemented user notifications about inaccurate `Tax Report` calculations due to `delisted` tokens. PR: [bfx-report-ui#926](https://github.com/bitfinexcom/bfx-report-ui/pull/926)
- Implemented the possibility to `Deduct Fees` in the `Tax Report`. PR: [bfx-report-ui#928](https://github.com/bitfinexcom/bfx-report-ui/pull/928)

### Changed

- Made two loading windows for a startup without a parent window independently and for common purposes as a modal window with a parent window to prevent the main window interaction when showing the loading window for some sensitive cases such as import/export DB. PR: [bfx-report-electron#535](https://github.com/bitfinexcom/bfx-report-electron/pull/535)
- Disabled `Loan Report` refresh button during initial synchronization to prevent report generation errors. Added a corresponding notice to communicate this to the user. PR: [bfx-report-ui#927](https://github.com/bitfinexcom/bfx-report-ui/pull/927)

### Fixed

- Fixed the sync requested by the user via the UI button in case the sync was added by the scheduler and the app was closed before completing earlier. PR: [bfx-reports-framework#454](https://github.com/bitfinexcom/bfx-reports-framework/pull/454)

## [4.35.0] - 2025-04-23

### Added
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bfx-report-electron",
"version": "4.35.0",
"version": "4.36.0",
"repository": "https://github.com/bitfinexcom/bfx-report-electron",
"description": "Reporting tool",
"author": "bitfinex.com",
Expand Down
7 changes: 6 additions & 1 deletion src/auto-updater/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const isMac = process.platform === 'darwin'
const log = require('../error-manager/log')
const BfxMacUpdater = require('./bfx.mac.updater')
const wins = require('../window-creators/windows')
const WINDOW_NAMES = require('../window-creators/window.names')
const {
showLoadingWindow,
hideLoadingWindow
Expand Down Expand Up @@ -291,6 +292,7 @@ const _autoUpdaterFactory = () => {

autoUpdater.addInstallingUpdateEventHandler(() => {
return showLoadingWindow({
windowName: WINDOW_NAMES.LOADING_WINDOW,
description: i18next.t('autoUpdater.loadingWindow.description'),
isRequiredToCloseAllWins: true
})
Expand Down Expand Up @@ -330,7 +332,10 @@ const _autoUpdaterFactory = () => {

isProgressToastEnabled = false

await hideLoadingWindow({ isRequiredToShowMainWin: false })
await hideLoadingWindow({
windowName: WINDOW_NAMES.LOADING_WINDOW,
isRequiredToShowMainWin: false
})

_switchMenuItem({
isCheckMenuItemDisabled: false,
Expand Down
10 changes: 6 additions & 4 deletions src/enforce-macos-app-location.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const {
showLoadingWindow,
hideLoadingWindow
} = require('./window-creators/change-loading-win-visibility-state')
const WINDOW_NAMES = require('./window-creators/window.names')

module.exports = async () => {
if (
Expand Down Expand Up @@ -47,12 +48,11 @@ module.exports = async () => {
}

await showLoadingWindow({
windowName: WINDOW_NAMES.STARTUP_LOADING_WINDOW,
description: i18next
.t('enforceMacOSAppLocation.loadingWindow.description'),
isRequiredToCloseAllWins: true,
isIndeterminateMode: true,
shouldCloseBtnBeShown: true,
shouldMinimizeBtnBeShown: true
isIndeterminateMode: true
})

app.moveToApplicationsFolder({
Expand All @@ -76,5 +76,7 @@ module.exports = async () => {
}
})

await hideLoadingWindow()
await hideLoadingWindow({
windowName: WINDOW_NAMES.STARTUP_LOADING_WINDOW
})
}
20 changes: 15 additions & 5 deletions src/export-db.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const {
setLoadingDescription
} = require('./window-creators/change-loading-win-visibility-state')
const wins = require('./window-creators/windows')
const WINDOW_NAMES = require('./window-creators/window.names')
const isMainWinAvailable = require('./helpers/is-main-win-available')
const {
DEFAULT_ARCHIVE_DB_FILE_NAME,
Expand All @@ -39,8 +40,8 @@ module.exports = ({
const secretKeyPath = path.join(pathToUserData, SECRET_KEY_FILE_NAME)

return async () => {
const win = isMainWinAvailable(wins.mainWindow)
? wins.mainWindow
const win = isMainWinAvailable(wins[WINDOW_NAMES.MAIN_WINDOW])
? wins[WINDOW_NAMES.MAIN_WINDOW]
: BrowserWindow.getFocusedWindow()

try {
Expand Down Expand Up @@ -69,6 +70,7 @@ module.exports = ({
}

await showLoadingWindow({
windowName: WINDOW_NAMES.LOADING_WINDOW,
description: i18next
.t('exportDB.loadingWindow.description')
})
Expand All @@ -90,7 +92,11 @@ module.exports = ({
: ''
const description = `${_description}${archived}`

await setLoadingDescription({ progress, description })
await setLoadingDescription({
windowName: WINDOW_NAMES.LOADING_WINDOW,
progress,
description
})
}

await zip(filePath, [
Expand All @@ -99,7 +105,9 @@ module.exports = ({
dbWalPath,
secretKeyPath
], { progressHandler })
await hideLoadingWindow()
await hideLoadingWindow({
windowName: WINDOW_NAMES.LOADING_WINDOW
})

await showMessageModalDialog(win, {
buttons: [
Expand All @@ -111,7 +119,9 @@ module.exports = ({
})
} catch (err) {
try {
await hideLoadingWindow()
await hideLoadingWindow({
windowName: WINDOW_NAMES.LOADING_WINDOW
})
await showErrorModalDialog(
win,
i18next.t('exportDB.modalDialog.title'),
Expand Down
15 changes: 10 additions & 5 deletions src/import-db.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const pauseApp = require('./pause-app')
const relaunch = require('./relaunch')
const { rm, isMainWinAvailable } = require('./helpers')
const wins = require('./window-creators/windows')
const WINDOW_NAMES = require('./window-creators/window.names')
const {
setLoadingDescription
} = require('./window-creators/change-loading-win-visibility-state')
Expand Down Expand Up @@ -44,8 +45,8 @@ module.exports = ({
pathToUserDocuments
}) => {
return async () => {
const win = isMainWinAvailable(wins.mainWindow)
? wins.mainWindow
const win = isMainWinAvailable(wins[WINDOW_NAMES.MAIN_WINDOW])
? wins[WINDOW_NAMES.MAIN_WINDOW]
: BrowserWindow.getFocusedWindow()

try {
Expand Down Expand Up @@ -99,7 +100,11 @@ module.exports = ({
: ''
const description = `${_description}${unzipped}`

await setLoadingDescription({ progress, description })
await setLoadingDescription({
windowName: WINDOW_NAMES.LOADING_WINDOW,
progress,
description
})
}

await pauseApp({
Expand Down Expand Up @@ -130,8 +135,8 @@ module.exports = ({
relaunch()
} catch (err) {
try {
const _win = isMainWinAvailable(wins.loadingWindow)
? wins.loadingWindow
const _win = isMainWinAvailable(wins[WINDOW_NAMES.LOADING_WINDOW])
? wins[WINDOW_NAMES.LOADING_WINDOW]
: win
await showErrorModalDialog(
_win,
Expand Down
12 changes: 6 additions & 6 deletions src/initialize-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const {
const {
hideLoadingWindow
} = require('./window-creators/change-loading-win-visibility-state')
const WINDOW_NAMES = require('./window-creators/window.names')
const makeOrReadSecretKey = require('./make-or-read-secret-key')
const {
configsKeeperFactory
Expand All @@ -53,10 +54,6 @@ const manageWorkerMessages = require(
)
const printToPDF = require('./print-to-pdf')

const pathToLayouts = path.join(__dirname, 'window-creators/layouts')
const pathToLayoutAppInitErr = path
.join(pathToLayouts, 'app-init-error.html')

const { rule: schedulerRule } = require(
'../bfx-reports-framework/config/schedule.json'
)
Expand Down Expand Up @@ -218,14 +215,17 @@ module.exports = async () => {
manageWorkerMessages(ipc)
await isServerReadyPromise
await triggerSyncAfterUpdates()
await hideLoadingWindow({ isRequiredToShowMainWin: true })
await hideLoadingWindow({
windowName: WINDOW_NAMES.STARTUP_LOADING_WINDOW,
isRequiredToShowMainWin: true
})
await triggerElectronLoad(portsMap)
await checkForUpdatesAndNotify()

printToPDF()
} catch (err) {
await app.whenReady()
await createErrorWindow(pathToLayoutAppInitErr)
await createErrorWindow()

throw err
}
Expand Down
2 changes: 2 additions & 0 deletions src/pause-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const ipcs = require('./ipcs')
const {
showLoadingWindow
} = require('./window-creators/change-loading-win-visibility-state')
const WINDOW_NAMES = require('./window-creators/window.names')

const _closeServer = () => {
return new Promise((resolve, reject) => {
Expand Down Expand Up @@ -35,6 +36,7 @@ module.exports = async (opts) => {
} = opts ?? {}

await showLoadingWindow({
windowName: WINDOW_NAMES.LOADING_WINDOW,
isRequiredToCloseAllWins: true,
...loadingWinParams
})
Expand Down
Loading