Meriadec Pillet
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with
23 additions and
16 deletions
-
src/components/AccountPage/index.js
-
src/components/BalanceSummary/index.js
-
src/components/DashboardPage/AccountCard.js
-
src/components/DashboardPage/index.js
-
src/components/MainSideBar/index.js
-
src/components/OperationsList/index.js
-
src/components/base/Chart/helpers.js
-
src/components/base/Modal/ModalBody.js
-
src/components/modals/OperationDetails.js
-
src/main/app.js
-
static/i18n/en/sidebar.yml
|
|
@ -74,8 +74,8 @@ type State = { |
|
|
|
|
|
|
|
class AccountPage extends PureComponent<Props, State> { |
|
|
|
state = { |
|
|
|
selectedTime: 'week', |
|
|
|
daysCount: 7, |
|
|
|
selectedTime: 'month', |
|
|
|
daysCount: 30, |
|
|
|
} |
|
|
|
|
|
|
|
handleChangeSelectedTime = item => |
|
|
|
|
|
@ -35,7 +35,7 @@ const BalanceSummary = ({ |
|
|
|
}: Props) => { |
|
|
|
const account = accounts.length === 1 ? accounts[0] : undefined |
|
|
|
return ( |
|
|
|
<Card p={0} py={6}> |
|
|
|
<Card p={0} py={5}> |
|
|
|
<CalculateBalance accounts={accounts} daysCount={daysCount}> |
|
|
|
{({ isAvailable, balanceHistory, balanceStart, balanceEnd }) => |
|
|
|
!isAvailable ? null : ( |
|
|
@ -57,7 +57,7 @@ const BalanceSummary = ({ |
|
|
|
unit={account ? account.unit : null} |
|
|
|
color={chartColor} |
|
|
|
data={balanceHistory} |
|
|
|
height={250} |
|
|
|
height={200} |
|
|
|
currency={counterValue} |
|
|
|
tickXScale={selectedTime} |
|
|
|
renderTickY={val => formatShort(counterValue.units[0], val)} |
|
|
|
|
|
@ -41,7 +41,7 @@ class AccountCard extends PureComponent<{ |
|
|
|
</Box> |
|
|
|
<Box> |
|
|
|
<Box style={{ textTransform: 'uppercase' }} fontSize={0} color="graphite"> |
|
|
|
{account.unit.code} |
|
|
|
{account.currency.name} |
|
|
|
</Box> |
|
|
|
<Box fontSize={4} color="dark"> |
|
|
|
{account.name} |
|
|
|
|
|
@ -56,8 +56,9 @@ type State = { |
|
|
|
|
|
|
|
class DashboardPage extends PureComponent<Props, State> { |
|
|
|
state = { |
|
|
|
selectedTime: 'week', |
|
|
|
daysCount: 7, |
|
|
|
// save to user preference?
|
|
|
|
selectedTime: 'month', |
|
|
|
daysCount: 30, |
|
|
|
} |
|
|
|
|
|
|
|
onAccountClick = account => this.props.push(`/account/${account.id}`) |
|
|
|
|
|
@ -124,7 +124,7 @@ class MainSideBar extends PureComponent<Props> { |
|
|
|
</SideBarList> |
|
|
|
<Space of={40} /> |
|
|
|
<SideBarList |
|
|
|
title={t('sidebar:accounts')} |
|
|
|
title={t('sidebar:accounts', { count: accounts.length })} |
|
|
|
titleRight={addAccountButton} |
|
|
|
emptyText={t('emptyState:sidebar.text')} |
|
|
|
> |
|
|
|
|
|
@ -66,7 +66,13 @@ const initialState = { |
|
|
|
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> { |
|
|
|
static defaultProps = { |
|
|
|
|
|
@ -25,7 +25,7 @@ export function generateMargins(hideAxis) { |
|
|
|
top: hideAxis ? 5 : 10, |
|
|
|
bottom: hideAxis ? 5 : 30, |
|
|
|
right: hideAxis ? 5 : 40, |
|
|
|
left: hideAxis ? 5 : 80, |
|
|
|
left: hideAxis ? 5 : 70, |
|
|
|
} |
|
|
|
|
|
|
|
// FIXME: Forced to "use" margins here to prevent babel/uglify to believe
|
|
|
|
|
|
@ -55,13 +55,13 @@ class ModalBody extends PureComponent<Props, State> { |
|
|
|
} |
|
|
|
|
|
|
|
const CloseContainer = styled(Box).attrs({ |
|
|
|
p: 4, |
|
|
|
p: 2, |
|
|
|
color: 'fog', |
|
|
|
})` |
|
|
|
cursor: pointer; |
|
|
|
position: absolute; |
|
|
|
top: 0; |
|
|
|
right: 0; |
|
|
|
top: 25px; |
|
|
|
right: 10px; |
|
|
|
z-index: 1; |
|
|
|
|
|
|
|
&:hover { |
|
|
|
|
|
@ -160,7 +160,7 @@ const OperationDetails = connect(mapStateToProps)((props: Props) => { |
|
|
|
<Line> |
|
|
|
<ColLeft>Fees</ColLeft> |
|
|
|
<ColRight> |
|
|
|
<FormattedVal unit={unit} showCode val={fee} /> |
|
|
|
<FormattedVal unit={unit} showCode val={fee} color="dark" /> |
|
|
|
</ColRight> |
|
|
|
</Line> |
|
|
|
<B /> |
|
|
|
|
|
@ -65,7 +65,7 @@ const defaultWindowOptions = { |
|
|
|
} |
|
|
|
|
|
|
|
function createMainWindow() { |
|
|
|
const MIN_HEIGHT = 768 |
|
|
|
const MIN_HEIGHT = 720 |
|
|
|
const MIN_WIDTH = 1024 |
|
|
|
|
|
|
|
const savedDimensions = db.getIn('settings', 'window.MainWindow.dimensions', {}) |
|
|
|
|
|
@ -1,4 +1,4 @@ |
|
|
|
menu: Menu |
|
|
|
accounts: Accounts |
|
|
|
accounts: Accounts ({{count}}) |
|
|
|
manager: Manager |
|
|
|
exchange: Exchange |
|
|
|