-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #399 from bitfinexcom/staging
Release version 4.26.0
- Loading branch information
Showing
11 changed files
with
147 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule bfx-report-ui
updated
27 files
Submodule bfx-reports-framework
updated
65 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
'use strict' | ||
|
||
const PROCESS_MESSAGES = require( | ||
'../../bfx-reports-framework/workers/loc.api/process.message.manager/process.messages' | ||
) | ||
const wins = require('../windows') | ||
const { isWindowInvisible } = require('../helpers/manage-window') | ||
const showNotification = require('./') | ||
|
||
const getBody = (params) => { | ||
const { | ||
isError, | ||
isInterrupted | ||
} = params ?? {} | ||
|
||
if (isError) { | ||
return 'Data sync completed with an error!' | ||
} | ||
if (isInterrupted) { | ||
return 'Data sync interrupted!' | ||
} | ||
|
||
return 'Data sync completed successfully!' | ||
} | ||
|
||
module.exports = (mess) => { | ||
const { | ||
state = '', | ||
data = {} | ||
} = mess ?? {} | ||
|
||
if (!isWindowInvisible(wins?.mainWindow)) { | ||
return | ||
} | ||
|
||
const isError = state === PROCESS_MESSAGES.ERROR_SYNC | ||
const isInterrupted = !!data?.isInterrupted | ||
|
||
const body = getBody({ isError, isInterrupted }) | ||
const urgency = isError ? 'critical' : 'normal' | ||
|
||
showNotification({ body, urgency }) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
'use strict' | ||
|
||
const PROCESS_MESSAGES = require( | ||
'../../bfx-reports-framework/workers/loc.api/process.message.manager/process.messages' | ||
) | ||
const wins = require('../windows') | ||
const { isWindowInvisible } = require('../helpers/manage-window') | ||
const showNotification = require('./') | ||
|
||
module.exports = (mess) => { | ||
const { | ||
state = '' | ||
} = mess ?? {} | ||
|
||
if (!isWindowInvisible(wins?.mainWindow)) { | ||
return | ||
} | ||
|
||
const isError = state === PROCESS_MESSAGES.ERROR_TRX_TAX_REPORT | ||
const body = isError | ||
? 'An unexpected error occurred while generating the tax report!' | ||
: 'Your tax report is ready!' | ||
const urgency = isError ? 'critical' : 'normal' | ||
|
||
showNotification({ body, urgency }) | ||
} |