Loëck Vézien
7 years ago
No known key found for this signature in database
GPG Key ID: CBCDCE384E853AC4
3 changed files with
18 additions and
14 deletions
-
src/components/AccountPage/index.js
-
src/components/DashboardPage/index.js
-
src/index.ejs
|
|
@ -85,18 +85,20 @@ class AccountPage extends PureComponent<Props, State> { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
ipcRenderer.send('touch-bar-update', { |
|
|
|
text: account.name, |
|
|
|
color: account.currency.color, |
|
|
|
balance: { |
|
|
|
currency: formatCurrencyUnit(account.unit, account.balance, { |
|
|
|
showCode: true, |
|
|
|
}), |
|
|
|
counterValue: formatCurrencyUnit(getFiatUnit(counterValue), data.totalBalance, { |
|
|
|
showCode: true, |
|
|
|
}), |
|
|
|
}, |
|
|
|
}) |
|
|
|
if (process.platform === 'darwin') { |
|
|
|
ipcRenderer.send('touch-bar-update', { |
|
|
|
text: account.name, |
|
|
|
color: account.currency.color, |
|
|
|
balance: { |
|
|
|
currency: formatCurrencyUnit(account.unit, account.balance, { |
|
|
|
showCode: true, |
|
|
|
}), |
|
|
|
counterValue: formatCurrencyUnit(getFiatUnit(counterValue), data.totalBalance, { |
|
|
|
showCode: true, |
|
|
|
}), |
|
|
|
}, |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
handleChangeSelectedTime = item => |
|
|
|
|
|
@ -85,7 +85,7 @@ class DashboardPage extends PureComponent<Props, State> { |
|
|
|
handleCalculateBalance = data => { |
|
|
|
const { counterValue } = this.props |
|
|
|
|
|
|
|
if (this._cacheBalance !== data.totalBalance) { |
|
|
|
if (process.platform === 'darwin' && this._cacheBalance !== data.totalBalance) { |
|
|
|
this._cacheBalance = data.totalBalance |
|
|
|
|
|
|
|
ipcRenderer.send('touch-bar-update', { |
|
|
|
|
|
@ -62,7 +62,9 @@ |
|
|
|
preloadEl.addEventListener('transitionend', () => preloadEl.remove()) |
|
|
|
} |
|
|
|
|
|
|
|
ipcRenderer.emit('touch-bar-init') |
|
|
|
if (process.platform === 'darwin') { |
|
|
|
ipcRenderer.emit('touch-bar-init') |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (name === 'MainWindow') { |
|
|
|