Skip to content

Commit 9f54635

Browse files
authored
Merge pull request #722 from nervosnetwork/rc/v0.1.0-alpha.14
[ᚬmaster] Release v0.1.0 alpha.14
2 parents d75a887 + 7be8028 commit 9f54635

File tree

37 files changed

+1061
-849
lines changed

37 files changed

+1061
-849
lines changed

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"packages": [
33
"packages/*"
44
],
5-
"version": "0.1.0-alpha.13",
5+
"version": "0.1.0-alpha.14",
66
"npmClient": "yarn",
77
"useWorkspaces": true
88
}

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@nervosnetwork/neuron",
33
"productName": "Neuron",
44
"description": "CKB Neuron Wallet",
5-
"version": "0.1.0-alpha.13",
5+
"version": "0.1.0-alpha.14",
66
"private": true,
77
"author": {
88
"name": "Nervos Core Dev",
@@ -43,7 +43,7 @@
4343
"@types/jest": "24.0.13",
4444
"@typescript-eslint/eslint-plugin": "1.10.2",
4545
"@typescript-eslint/parser": "1.10.2",
46-
"concurrently": "4.1.0",
46+
"concurrently": "4.1.1",
4747
"cross-env": "5.2.0",
4848
"cz-conventional-changelog": "2.1.0",
4949
"eslint": "5.16.0",
@@ -53,14 +53,14 @@
5353
"eslint-plugin-jsx-a11y": "6.2.1",
5454
"eslint-plugin-prettier": "3.1.0",
5555
"eslint-plugin-react": "7.13.0",
56-
"husky": "2.3.0",
57-
"lerna": "3.15.0",
56+
"husky": "3.0.1",
57+
"lerna": "3.16.2",
5858
"ncp": "2.0.0",
5959
"nodemon": "1.19.1",
6060
"prettier": "1.17.1",
6161
"ts-jest": "24.0.2",
62-
"typescript": "3.5.2",
63-
"wait-on": "3.2.0"
62+
"typescript": "3.5.3",
63+
"wait-on": "3.3.0"
6464
},
6565
"dependencies": {},
6666
"config": {

packages/neuron-ui/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nervosnetwork/neuron-ui",
3-
"version": "0.1.0-alpha.13",
3+
"version": "0.1.0-alpha.14",
44
"private": true,
55
"author": {
66
"name": "Nervos Core Dev",
@@ -77,7 +77,7 @@
7777
"enzyme-adapter-react-16": "1.13.2",
7878
"jest-styled-components": "7.0.0-beta.1",
7979
"jsqr": "1.2.0",
80-
"lint-staged": "8.1.7",
80+
"lint-staged": "9.2.0",
8181
"node-sass": "4.12.0",
8282
"react-app-rewired": "2.1.3",
8383
"rimraf": "2.6.3",

packages/neuron-ui/src/components/History/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
LinkBottom as LinkBottomIcon,
1010
LinkTop as LinkTopIcon,
1111
LinkUp as LinkUpIcon,
12+
FormClose as ClearIcon,
1213
} from 'grommet-icons'
1314

1415
import TransactionList from 'components/TransactionList'
@@ -28,6 +29,7 @@ registerIcons({
2829
LastPage: <LinkBottomIcon size="16px" color={semanticColors.menuIcon} style={{ transform: 'rotate(-90deg)' }} />,
2930
PrevPage: <LinkUpIcon size="16px" color={semanticColors.menuIcon} style={{ transform: 'rotate(-90deg)' }} />,
3031
NextPage: <LinkDownIcon size="16px" color={semanticColors.menuIcon} style={{ transform: 'rotate(-90deg)' }} />,
32+
Clear: <ClearIcon size="16px" />,
3133
},
3234
})
3335

packages/neuron-ui/src/components/LaunchScreen/index.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { useTranslation } from 'react-i18next'
44
import { Panel, PanelType, Spinner, SpinnerSize } from 'office-ui-fabric-react'
55

66
import { StateWithDispatch } from 'states/stateProvider/reducer'
7-
import { WalletWizardPath } from 'components/WalletWizard'
87
import { Routes } from 'utils/const'
98

109
export const LaunchScreen = ({
@@ -16,8 +15,6 @@ export const LaunchScreen = ({
1615
useEffect(() => {
1716
if (id) {
1817
history.push(Routes.Overview)
19-
} else {
20-
history.push(`${Routes.WalletWizard}${WalletWizardPath.Welcome}`)
2118
}
2219
}, [id, history])
2320

packages/neuron-ui/src/components/Overview/index.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import actionCreators from 'states/stateProvider/actionCreators'
2626

2727
import { showErrorMessage } from 'services/remote'
2828

29-
import { localNumberFormatter, shannonToCKBFormatter } from 'utils/formatters'
29+
import { localNumberFormatter, shannonToCKBFormatter, uniformTimeFormatter as timeFormatter } from 'utils/formatters'
3030
import { PAGE_SIZE, MIN_CELL_WIDTH } from 'utils/const'
3131
import { registerIcons } from 'utils/icons'
3232

@@ -36,15 +36,6 @@ registerIcons({
3636
},
3737
})
3838

39-
const timeFormatter = new Intl.DateTimeFormat(undefined, {
40-
year: 'numeric',
41-
month: 'numeric',
42-
day: 'numeric',
43-
hour: '2-digit',
44-
minute: '2-digit',
45-
second: '2-digit',
46-
})
47-
4839
const TITLE_FONT_SIZE = 'xxLarge'
4940

5041
const PropertyList = ({
@@ -146,7 +137,7 @@ const Overview = ({
146137
if (item) {
147138
return (
148139
<Text variant="mediumPlus" as="span">
149-
{timeFormatter.format(+(item.timestamp || item.createdAt)).toLocaleString()}
140+
{timeFormatter(item.timestamp || item.createdAt)}
150141
</Text>
151142
)
152143
}

packages/neuron-ui/src/components/Settings/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ const Settings = ({
5959
</IconButton>
6060
</Stack.Item>
6161
<Stack.Item align="center">
62-
<Text variant="xLarge" as="h1">{t('navbar.settings')}</Text>
62+
<Text variant="xLarge" as="h1">
63+
{t('navbar.settings')}
64+
</Text>
6365
</Stack.Item>
6466
</Stack>
6567

packages/neuron-ui/src/components/Transaction/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { AppActions, StateWithDispatch } from 'states/stateProvider/reducer'
77
import actionCreators from 'states/stateProvider/actionCreators'
88
import chainState from 'states/initStates/chain'
99

10-
import { localNumberFormatter } from 'utils/formatters'
10+
import { localNumberFormatter, uniformTimeFormatter } from 'utils/formatters'
1111

1212
const MIN_CELL_WIDTH = 70
1313

@@ -114,7 +114,7 @@ const Transaction = ({
114114
{
115115
label: t('history.date'),
116116
value: +(transaction.timestamp || transaction.createdAt)
117-
? new Date(+transaction.timestamp || +transaction.createdAt).toLocaleString()
117+
? uniformTimeFormatter(+(transaction.timestamp || transaction.createdAt))
118118
: 'none',
119119
},
120120
{

packages/neuron-ui/src/components/TransactionList/index.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,21 @@ import {
1111
ITextFieldStyleProps,
1212
getTheme,
1313
} from 'office-ui-fabric-react'
14+
import { FormUp as ExpandIcon } from 'grommet-icons'
1415

1516
import { StateDispatch } from 'states/stateProvider/reducer'
1617

1718
import { appCalls } from 'services/UILayer'
1819
import { useLocalDescription } from 'utils/hooks'
19-
import { shannonToCKBFormatter } from 'utils/formatters'
20+
import { shannonToCKBFormatter, uniformTimeFormatter as timeFormatter, uniformTimeFormatter } from 'utils/formatters'
21+
import { registerIcons } from 'utils/icons'
22+
23+
registerIcons({
24+
icons: {
25+
ChevronRightMed: <ExpandIcon size="16px" style={{ transform: 'rotate(90deg) translate(2px, 0px)' }} />,
26+
},
27+
})
2028

21-
const timeFormatter = new Intl.DateTimeFormat('en-GB')
2229
const theme = getTheme()
2330

2431
const MIN_CELL_WIDTH = 50
@@ -81,7 +88,7 @@ const TransactionList = ({
8188
minWidth: 80,
8289
maxWidth: 80,
8390
onRender: (item?: FormatTransaction) => {
84-
return item ? <span>{new Date(+(item.timestamp || item.createdAt)).toLocaleTimeString()}</span> : null
91+
return item ? <span>{uniformTimeFormatter(item.timestamp || item.createdAt).split(' ')[1]}</span> : null
8592
},
8693
},
8794
{
@@ -162,7 +169,7 @@ const TransactionList = ({
162169
},
163170
]
164171
const txItems = items.map(item => {
165-
const date = timeFormatter.format(+(item.timestamp || item.createdAt))
172+
const date = timeFormatter(+(item.timestamp || item.createdAt)).split(' ')[0]
166173
if (item.status === 'pending') {
167174
groupItems[0].count++
168175
return { ...item, date }

packages/neuron-ui/src/containers/Footer/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Stack, getTheme, Text, ProgressIndicator } from 'office-ui-fabric-react
66
import { Alert as AlertIcon, Nodes as ConnectIcon } from 'grommet-icons'
77

88
import { StateWithDispatch } from 'states/stateProvider/reducer'
9-
import { ConnectStatus, FULL_SCREENS, Routes } from 'utils/const'
9+
import { ConnectionStatus, FULL_SCREENS, Routes } from 'utils/const'
1010
import { localNumberFormatter } from 'utils/formatters'
1111
import { NeuronWalletContext } from 'states/stateProvider'
1212

@@ -68,7 +68,7 @@ const Footer = ({
6868
}: React.PropsWithoutRef<StateWithDispatch & RouteComponentProps>) => {
6969
const {
7070
app: { tipBlockNumber },
71-
chain: { networkID, connectStatus, tipBlockNumber: syncedBlockNumber },
71+
chain: { networkID, connectionStatus, tipBlockNumber: syncedBlockNumber },
7272
settings: { networks },
7373
} = useContext(NeuronWalletContext)
7474
const [t] = useTranslation()
@@ -97,7 +97,7 @@ const Footer = ({
9797

9898
<Stack styles={stackItemStyles} onClick={goToNetworksSetting} horizontal>
9999
{currentNetwork ? (
100-
<NetworkStatus online={connectStatus === ConnectStatus.Online} name={currentNetwork.name} />
100+
<NetworkStatus online={connectionStatus === ConnectionStatus.Online} name={currentNetwork.name} />
101101
) : (
102102
<Text>{t('settings.setting-tabs.network')}</Text>
103103
)}

0 commit comments

Comments
 (0)