Merge pull request #2866 from ethcore/ng-accounts-backup

Export accounts as JSON or CSV
This commit is contained in:
Gav Wood
2016-11-16 11:31:18 +08:00
committed by GitHub
3 changed files with 16 additions and 9 deletions

View File

@@ -22,7 +22,7 @@ import { uniq } from 'lodash';
import List from './List';
import { CreateAccount } from '../../modals';
import { Actionbar, ActionbarSearch, ActionbarSort, Button, Page, Tooltip } from '../../ui';
import { Actionbar, ActionbarExport, ActionbarSearch, ActionbarSort, Button, Page, Tooltip } from '../../ui';
import styles from './accounts.css';
@@ -97,6 +97,8 @@ class Accounts extends Component {
}
renderActionbar () {
const { accounts } = this.props;
const buttons = [
<Button
key='newAccount'
@@ -104,6 +106,11 @@ class Accounts extends Component {
label='new account'
onClick={ this.onNewAccountClick } />,
<ActionbarExport
key='exportAccounts'
content={ accounts }
filename='accounts' />,
this.renderSearchButton(),
this.renderSortButton()
];

View File

@@ -107,7 +107,7 @@ class Addresses extends Component {
<ActionbarExport
key='exportAddressbook'
content={ contacts }
filename='addressbook.json' />,
filename='addressbook' />,
<ActionbarImport
key='importAddressbook'