Gaëtan Renaudeau 7 years ago
parent
commit
04218e45b3
  1. 4
      src/components/BalanceSummary/index.js
  2. 5
      src/components/DashboardPage/index.js
  3. 2
      src/components/base/Chart/helpers.js
  4. 2
      src/main/app.js

4
src/components/BalanceSummary/index.js

@ -35,7 +35,7 @@ const BalanceSummary = ({
}: Props) => { }: Props) => {
const account = accounts.length === 1 ? accounts[0] : undefined const account = accounts.length === 1 ? accounts[0] : undefined
return ( return (
<Card p={0} py={6}> <Card p={0} py={5}>
<CalculateBalance accounts={accounts} daysCount={daysCount}> <CalculateBalance accounts={accounts} daysCount={daysCount}>
{({ isAvailable, balanceHistory, balanceStart, balanceEnd }) => {({ isAvailable, balanceHistory, balanceStart, balanceEnd }) =>
!isAvailable ? null : ( !isAvailable ? null : (
@ -57,7 +57,7 @@ const BalanceSummary = ({
unit={account ? account.unit : null} unit={account ? account.unit : null}
color={chartColor} color={chartColor}
data={balanceHistory} data={balanceHistory}
height={250} height={200}
currency={counterValue} currency={counterValue}
tickXScale={selectedTime} tickXScale={selectedTime}
renderTickY={val => formatShort(counterValue.units[0], val)} renderTickY={val => formatShort(counterValue.units[0], val)}

5
src/components/DashboardPage/index.js

@ -56,8 +56,9 @@ type State = {
class DashboardPage extends PureComponent<Props, State> { class DashboardPage extends PureComponent<Props, State> {
state = { state = {
selectedTime: 'week', // save to user preference?
daysCount: 7, selectedTime: 'month',
daysCount: 30,
} }
onAccountClick = account => this.props.push(`/account/${account.id}`) onAccountClick = account => this.props.push(`/account/${account.id}`)

2
src/components/base/Chart/helpers.js

@ -25,7 +25,7 @@ export function generateMargins(hideAxis) {
top: hideAxis ? 5 : 10, top: hideAxis ? 5 : 10,
bottom: hideAxis ? 5 : 30, bottom: hideAxis ? 5 : 30,
right: hideAxis ? 5 : 40, right: hideAxis ? 5 : 40,
left: hideAxis ? 5 : 80, left: hideAxis ? 5 : 70,
} }
// FIXME: Forced to "use" margins here to prevent babel/uglify to believe // FIXME: Forced to "use" margins here to prevent babel/uglify to believe

2
src/main/app.js

@ -65,7 +65,7 @@ const defaultWindowOptions = {
} }
function createMainWindow() { function createMainWindow() {
const MIN_HEIGHT = 768 const MIN_HEIGHT = 500 //768
const MIN_WIDTH = 1024 const MIN_WIDTH = 1024
const savedDimensions = db.getIn('settings', 'window.MainWindow.dimensions', {}) const savedDimensions = db.getIn('settings', 'window.MainWindow.dimensions', {})

Loading…
Cancel
Save