Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DDW-929] Implement date, time and number format user options #1611

Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f294703
[DDW-929] General Settings UI
thedanheller Oct 21, 2019
f7447a7
[DDW-929] CHANGELOG Entry
thedanheller Oct 21, 2019
a11f68c
[DDW-9229] App First Launch screen
thedanheller Oct 21, 2019
0a81ab3
[DDW-929] Change app language in the initial setup
thedanheller Oct 22, 2019
64a746b
[DDW-929] Simplify LocalStorage
thedanheller Oct 22, 2019
359b66c
[DDW-929] Profile Store and LocalStorage actions
thedanheller Oct 23, 2019
d379cb9
[DDW-929] Using GeneralSettings component
thedanheller Oct 23, 2019
0eae796
[DDW-929] Unify intl ids
thedanheller Oct 23, 2019
5887d14
[DDW-929] Simplify _updateUserLocalSetting
thedanheller Oct 23, 2019
dce9480
[DDW-929] Add logic for the initial screen persistence
thedanheller Oct 23, 2019
fcf0087
[DDW-929] Date and Time format for Transactions
thedanheller Oct 23, 2019
1d2f461
[DDW-929] Date and Time format for Transactions
thedanheller Oct 23, 2019
0a3950a
[DDW-929] Date format for News Feed
thedanheller Oct 23, 2019
c02264f
[DDW-929] Date format for News Feed
thedanheller Oct 23, 2019
d7955b9
Merge branch 'develop' into feature/ddw-929-implement-date-time-and-n…
nikolaglumac Oct 24, 2019
da4225b
[DDW-929] Number Format for Summary and Deleg Center
thedanheller Oct 24, 2019
f4fbbe8
[DDW-929] Number Format for Sidebar
thedanheller Oct 24, 2019
0a5a115
Merge branch 'feature/ddw-929-implement-date-time-and-number-format-u…
thedanheller Oct 24, 2019
95fef8c
[DDW-929] Remaining Number Format places
thedanheller Oct 24, 2019
ab32b37
Revert to d7955b9eb4128fdc3014f02575caa0d04748a0f0
thedanheller Oct 25, 2019
058b490
[DDW-929] Simpler 'numberFormat' solution
thedanheller Oct 25, 2019
bbb3d0d
[DDW-929] E2E tests adjustments
thedanheller Oct 25, 2019
d1bda9d
Merge branch 'develop' into feature/ddw-929-implement-date-time-and-n…
thedanheller Oct 25, 2019
bbbf761
[DDW-929] Simplify the props passed
thedanheller Oct 25, 2019
cce520f
[DDW-929] Simplify the initial screen logic
thedanheller Oct 25, 2019
35fd839
[DDW-929] Fix broken Select labels
thedanheller Oct 27, 2019
75c35b8
[DDW-929] Formats hardcoded ADA amounts
thedanheller Oct 27, 2019
c99a9a0
[DDW-929] Formats Rewards ADA amounts
thedanheller Oct 28, 2019
193b664
[DDW-929] Add formatting to Diagnostics screen
thedanheller Oct 28, 2019
6c772d5
[DDW-929] Translation manager
thedanheller Oct 28, 2019
6af3e96
[DDW-929] Custom date and time in the Paper Wallet
thedanheller Oct 28, 2019
645e015
Merge branch 'develop' into feature/ddw-929-implement-date-time-and-n…
nikolaglumac Oct 29, 2019
604ac38
[DDW-929] Additional formatting to Diagnostics screen
thedanheller Oct 29, 2019
1cc3bac
Merge branch 'feature/ddw-929-implement-date-time-and-number-format-u…
thedanheller Oct 29, 2019
27e43f1
[DDW-929] Prevent BigNumber error
thedanheller Oct 29, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ Changelog

## vNext

### Features

- Implemented date, time and number format user options ([PR 1611](https://github.com/input-output-hk/daedalus/pull/1611))

### Chores

- Fixed build mode of webpack auto dll plugin ([PR 1606](https://github.com/input-output-hk/daedalus/pull/1606))
Expand Down
33 changes: 33 additions & 0 deletions source/common/types/number.types.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// @flow
export type NumberFormat = {
groupSeparator: '.' | ',' | ' ',
decimalSeparator: '.' | ',' | ' ',
};

type NumbersFormat = {
[key: string]: NumberFormat,
};

export const NUMBER_FORMATS: NumbersFormat = {
'number-1': {
groupSeparator: ',',
decimalSeparator: '.',
},
'number-2': {
groupSeparator: '.',
decimalSeparator: ',',
},
'number-3': {
groupSeparator: ' ',
decimalSeparator: '.',
},
};

export const DEFAULT_NUMBER_FORMAT: Object = {
decimalSeparator: '.',
groupSeparator: ',',
groupSize: 3,
secondaryGroupSize: 0,
fractionGroupSeparator: ' ',
fractionGroupSize: 0,
};
6 changes: 3 additions & 3 deletions source/renderer/app/Routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ROUTES } from './routes-config';

// PAGES
import Root from './containers/Root';
import LanguageSelectionPage from './containers/profile/LanguageSelectionPage';
import InitialSettingsPage from './containers/profile/InitialSettingsPage';
import Settings from './containers/settings/Settings';
import GeneralSettingsPage from './containers/settings/categories/GeneralSettingsPage';
import SupportSettingsPage from './containers/settings/categories/SupportSettingsPage';
Expand Down Expand Up @@ -34,8 +34,8 @@ export const Routes = (
<Route path={ROUTES.ROOT} component={Root}>
<IndexRedirect to={ROUTES.WALLETS.ROOT} />
<Route
path={ROUTES.PROFILE.LANGUAGE_SELECTION}
component={LanguageSelectionPage}
path={ROUTES.PROFILE.INITIAL_SETTINGS}
component={InitialSettingsPage}
/>
<Route path={ROUTES.PROFILE.TERMS_OF_USE} component={TermsOfUsePage} />
<Route
Expand Down
6 changes: 5 additions & 1 deletion source/renderer/app/actions/profile-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ export default class ProfileActions {
fresh?: boolean,
}> = new Action();
downloadLogsSuccess: Action<any> = new Action();
updateLocale: Action<{ locale: string }> = new Action();
updateUserLocalSetting: Action<{
param: string,
value?: string,
}> = new Action();
updateTheme: Action<{ theme: string }> = new Action();
finishInitialScreenSettings: Action<any> = new Action();
}
1 change: 1 addition & 0 deletions source/renderer/app/api/transactions/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export type Transaction = {
tag: 'applying' | 'inNewestBlocks' | 'persisted' | 'wontApply' | 'creating',
data: {},
},
currentTimeFormat: string,
};

export type PaymentDistribution = {
Expand Down
Loading