Browse Source

Merge pull request #518 from gre/pixel-push

Pixel push
master
Meriadec Pillet 7 years ago
committed by GitHub
parent
commit
8d9cdae33d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/components/AccountPage/index.js
  2. 4
      src/components/BalanceSummary/index.js
  3. 2
      src/components/DashboardPage/AccountCard.js
  4. 5
      src/components/DashboardPage/index.js
  5. 2
      src/components/MainSideBar/index.js
  6. 8
      src/components/OperationsList/index.js
  7. 2
      src/components/base/Chart/helpers.js
  8. 6
      src/components/base/Modal/ModalBody.js
  9. 2
      src/components/modals/OperationDetails.js
  10. 2
      src/main/app.js
  11. 2
      static/i18n/en/sidebar.yml

4
src/components/AccountPage/index.js

@ -74,8 +74,8 @@ type State = {
class AccountPage extends PureComponent<Props, State> { class AccountPage extends PureComponent<Props, State> {
state = { state = {
selectedTime: 'week', selectedTime: 'month',
daysCount: 7, daysCount: 30,
} }
handleChangeSelectedTime = item => handleChangeSelectedTime = item =>

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)}

2
src/components/DashboardPage/AccountCard.js

@ -41,7 +41,7 @@ class AccountCard extends PureComponent<{
</Box> </Box>
<Box> <Box>
<Box style={{ textTransform: 'uppercase' }} fontSize={0} color="graphite"> <Box style={{ textTransform: 'uppercase' }} fontSize={0} color="graphite">
{account.unit.code} {account.currency.name}
</Box> </Box>
<Box fontSize={4} color="dark"> <Box fontSize={4} color="dark">
{account.name} {account.name}

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/MainSideBar/index.js

@ -124,7 +124,7 @@ class MainSideBar extends PureComponent<Props> {
</SideBarList> </SideBarList>
<Space of={40} /> <Space of={40} />
<SideBarList <SideBarList
title={t('sidebar:accounts')} title={t('sidebar:accounts', { count: accounts.length })}
titleRight={addAccountButton} titleRight={addAccountButton}
emptyText={t('emptyState:sidebar.text')} emptyText={t('emptyState:sidebar.text')}
> >

8
src/components/OperationsList/index.js

@ -66,7 +66,13 @@ const initialState = {
nbToShow: 20, nbToShow: 20,
} }
const footerPlaceholder = null // TODO figure out with design what we want here const footerPlaceholder = (
<Box p={4} align="center">
<Text ff="Open Sans" fontSize={3}>
No more operations
</Text>
</Box>
)
export class OperationsList extends PureComponent<Props, State> { export class OperationsList extends PureComponent<Props, State> {
static defaultProps = { static defaultProps = {

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

6
src/components/base/Modal/ModalBody.js

@ -55,13 +55,13 @@ class ModalBody extends PureComponent<Props, State> {
} }
const CloseContainer = styled(Box).attrs({ const CloseContainer = styled(Box).attrs({
p: 4, p: 2,
color: 'fog', color: 'fog',
})` })`
cursor: pointer; cursor: pointer;
position: absolute; position: absolute;
top: 0; top: 25px;
right: 0; right: 10px;
z-index: 1; z-index: 1;
&:hover { &:hover {

2
src/components/modals/OperationDetails.js

@ -160,7 +160,7 @@ const OperationDetails = connect(mapStateToProps)((props: Props) => {
<Line> <Line>
<ColLeft>Fees</ColLeft> <ColLeft>Fees</ColLeft>
<ColRight> <ColRight>
<FormattedVal unit={unit} showCode val={fee} /> <FormattedVal unit={unit} showCode val={fee} color="dark" />
</ColRight> </ColRight>
</Line> </Line>
<B /> <B />

2
src/main/app.js

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

2
static/i18n/en/sidebar.yml

@ -1,4 +1,4 @@
menu: Menu menu: Menu
accounts: Accounts accounts: Accounts ({{count}})
manager: Manager manager: Manager
exchange: Exchange exchange: Exchange

Loading…
Cancel
Save