Skip to content

Commit

Permalink
Merge pull request #722 from nervosnetwork/rc/v0.1.0-alpha.14
Browse files Browse the repository at this point in the history
[ᚬmaster] Release v0.1.0 alpha.14
  • Loading branch information
ashchan authored Jul 23, 2019
2 parents d75a887 + 7be8028 commit 9f54635
Show file tree
Hide file tree
Showing 37 changed files with 1,061 additions and 849 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"packages": [
"packages/*"
],
"version": "0.1.0-alpha.13",
"version": "0.1.0-alpha.14",
"npmClient": "yarn",
"useWorkspaces": true
}
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@nervosnetwork/neuron",
"productName": "Neuron",
"description": "CKB Neuron Wallet",
"version": "0.1.0-alpha.13",
"version": "0.1.0-alpha.14",
"private": true,
"author": {
"name": "Nervos Core Dev",
Expand Down Expand Up @@ -43,7 +43,7 @@
"@types/jest": "24.0.13",
"@typescript-eslint/eslint-plugin": "1.10.2",
"@typescript-eslint/parser": "1.10.2",
"concurrently": "4.1.0",
"concurrently": "4.1.1",
"cross-env": "5.2.0",
"cz-conventional-changelog": "2.1.0",
"eslint": "5.16.0",
Expand All @@ -53,14 +53,14 @@
"eslint-plugin-jsx-a11y": "6.2.1",
"eslint-plugin-prettier": "3.1.0",
"eslint-plugin-react": "7.13.0",
"husky": "2.3.0",
"lerna": "3.15.0",
"husky": "3.0.1",
"lerna": "3.16.2",
"ncp": "2.0.0",
"nodemon": "1.19.1",
"prettier": "1.17.1",
"ts-jest": "24.0.2",
"typescript": "3.5.2",
"wait-on": "3.2.0"
"typescript": "3.5.3",
"wait-on": "3.3.0"
},
"dependencies": {},
"config": {
Expand Down
4 changes: 2 additions & 2 deletions packages/neuron-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nervosnetwork/neuron-ui",
"version": "0.1.0-alpha.13",
"version": "0.1.0-alpha.14",
"private": true,
"author": {
"name": "Nervos Core Dev",
Expand Down Expand Up @@ -77,7 +77,7 @@
"enzyme-adapter-react-16": "1.13.2",
"jest-styled-components": "7.0.0-beta.1",
"jsqr": "1.2.0",
"lint-staged": "8.1.7",
"lint-staged": "9.2.0",
"node-sass": "4.12.0",
"react-app-rewired": "2.1.3",
"rimraf": "2.6.3",
Expand Down
2 changes: 2 additions & 0 deletions packages/neuron-ui/src/components/History/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
LinkBottom as LinkBottomIcon,
LinkTop as LinkTopIcon,
LinkUp as LinkUpIcon,
FormClose as ClearIcon,
} from 'grommet-icons'

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

Expand Down
3 changes: 0 additions & 3 deletions packages/neuron-ui/src/components/LaunchScreen/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { useTranslation } from 'react-i18next'
import { Panel, PanelType, Spinner, SpinnerSize } from 'office-ui-fabric-react'

import { StateWithDispatch } from 'states/stateProvider/reducer'
import { WalletWizardPath } from 'components/WalletWizard'
import { Routes } from 'utils/const'

export const LaunchScreen = ({
Expand All @@ -16,8 +15,6 @@ export const LaunchScreen = ({
useEffect(() => {
if (id) {
history.push(Routes.Overview)
} else {
history.push(`${Routes.WalletWizard}${WalletWizardPath.Welcome}`)
}
}, [id, history])

Expand Down
13 changes: 2 additions & 11 deletions packages/neuron-ui/src/components/Overview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import actionCreators from 'states/stateProvider/actionCreators'

import { showErrorMessage } from 'services/remote'

import { localNumberFormatter, shannonToCKBFormatter } from 'utils/formatters'
import { localNumberFormatter, shannonToCKBFormatter, uniformTimeFormatter as timeFormatter } from 'utils/formatters'
import { PAGE_SIZE, MIN_CELL_WIDTH } from 'utils/const'
import { registerIcons } from 'utils/icons'

Expand All @@ -36,15 +36,6 @@ registerIcons({
},
})

const timeFormatter = new Intl.DateTimeFormat(undefined, {
year: 'numeric',
month: 'numeric',
day: 'numeric',
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
})

const TITLE_FONT_SIZE = 'xxLarge'

const PropertyList = ({
Expand Down Expand Up @@ -146,7 +137,7 @@ const Overview = ({
if (item) {
return (
<Text variant="mediumPlus" as="span">
{timeFormatter.format(+(item.timestamp || item.createdAt)).toLocaleString()}
{timeFormatter(item.timestamp || item.createdAt)}
</Text>
)
}
Expand Down
4 changes: 3 additions & 1 deletion packages/neuron-ui/src/components/Settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ const Settings = ({
</IconButton>
</Stack.Item>
<Stack.Item align="center">
<Text variant="xLarge" as="h1">{t('navbar.settings')}</Text>
<Text variant="xLarge" as="h1">
{t('navbar.settings')}
</Text>
</Stack.Item>
</Stack>

Expand Down
4 changes: 2 additions & 2 deletions packages/neuron-ui/src/components/Transaction/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { AppActions, StateWithDispatch } from 'states/stateProvider/reducer'
import actionCreators from 'states/stateProvider/actionCreators'
import chainState from 'states/initStates/chain'

import { localNumberFormatter } from 'utils/formatters'
import { localNumberFormatter, uniformTimeFormatter } from 'utils/formatters'

const MIN_CELL_WIDTH = 70

Expand Down Expand Up @@ -114,7 +114,7 @@ const Transaction = ({
{
label: t('history.date'),
value: +(transaction.timestamp || transaction.createdAt)
? new Date(+transaction.timestamp || +transaction.createdAt).toLocaleString()
? uniformTimeFormatter(+(transaction.timestamp || transaction.createdAt))
: 'none',
},
{
Expand Down
15 changes: 11 additions & 4 deletions packages/neuron-ui/src/components/TransactionList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,21 @@ import {
ITextFieldStyleProps,
getTheme,
} from 'office-ui-fabric-react'
import { FormUp as ExpandIcon } from 'grommet-icons'

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

import { appCalls } from 'services/UILayer'
import { useLocalDescription } from 'utils/hooks'
import { shannonToCKBFormatter } from 'utils/formatters'
import { shannonToCKBFormatter, uniformTimeFormatter as timeFormatter, uniformTimeFormatter } from 'utils/formatters'
import { registerIcons } from 'utils/icons'

registerIcons({
icons: {
ChevronRightMed: <ExpandIcon size="16px" style={{ transform: 'rotate(90deg) translate(2px, 0px)' }} />,
},
})

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

const MIN_CELL_WIDTH = 50
Expand Down Expand Up @@ -81,7 +88,7 @@ const TransactionList = ({
minWidth: 80,
maxWidth: 80,
onRender: (item?: FormatTransaction) => {
return item ? <span>{new Date(+(item.timestamp || item.createdAt)).toLocaleTimeString()}</span> : null
return item ? <span>{uniformTimeFormatter(item.timestamp || item.createdAt).split(' ')[1]}</span> : null
},
},
{
Expand Down Expand Up @@ -162,7 +169,7 @@ const TransactionList = ({
},
]
const txItems = items.map(item => {
const date = timeFormatter.format(+(item.timestamp || item.createdAt))
const date = timeFormatter(+(item.timestamp || item.createdAt)).split(' ')[0]
if (item.status === 'pending') {
groupItems[0].count++
return { ...item, date }
Expand Down
6 changes: 3 additions & 3 deletions packages/neuron-ui/src/containers/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Stack, getTheme, Text, ProgressIndicator } from 'office-ui-fabric-react
import { Alert as AlertIcon, Nodes as ConnectIcon } from 'grommet-icons'

import { StateWithDispatch } from 'states/stateProvider/reducer'
import { ConnectStatus, FULL_SCREENS, Routes } from 'utils/const'
import { ConnectionStatus, FULL_SCREENS, Routes } from 'utils/const'
import { localNumberFormatter } from 'utils/formatters'
import { NeuronWalletContext } from 'states/stateProvider'

Expand Down Expand Up @@ -68,7 +68,7 @@ const Footer = ({
}: React.PropsWithoutRef<StateWithDispatch & RouteComponentProps>) => {
const {
app: { tipBlockNumber },
chain: { networkID, connectStatus, tipBlockNumber: syncedBlockNumber },
chain: { networkID, connectionStatus, tipBlockNumber: syncedBlockNumber },
settings: { networks },
} = useContext(NeuronWalletContext)
const [t] = useTranslation()
Expand Down Expand Up @@ -97,7 +97,7 @@ const Footer = ({

<Stack styles={stackItemStyles} onClick={goToNetworksSetting} horizontal>
{currentNetwork ? (
<NetworkStatus online={connectStatus === ConnectStatus.Online} name={currentNetwork.name} />
<NetworkStatus online={connectionStatus === ConnectionStatus.Online} name={currentNetwork.name} />
) : (
<Text>{t('settings.setting-tabs.network')}</Text>
)}
Expand Down
Loading

0 comments on commit 9f54635

Please sign in to comment.