Rename the "Addresses" app into "Address book" (#1034)
* change addresses to address book * rename address into contact
This commit is contained in:
parent
bdd046c86e
commit
03089f3f01
@ -17,7 +17,7 @@ The repo is split into a number of packages, each representing an application. T
|
||||
|
||||
- [apps](packages/apps/) This is the main entry point. It handles the selection sidebar and routing to the specific application being displayed.
|
||||
- [app-accounts](packages/app-accounts/) A basic account management app.
|
||||
- [app-addresses](packages/app-addresses/) A basic address management app.
|
||||
- [app-address-book](packages/app-address-book/) A basic address management app.
|
||||
- [app-democracy](packages/app-democracy/) A basic voting app, allowing votes on activate proposals and referendums.
|
||||
- [app-explorer](packages/app-explorer/) A simple block explorer. It only shows the most recent blocks, updating as they become available.
|
||||
- [app-extrinsics](packages/app-extrinsics/) Submission of extrinsics to a node.
|
||||
|
||||
1
packages/app-address-book/README.md
Normal file
1
packages/app-address-book/README.md
Normal file
@ -0,0 +1 @@
|
||||
# @polkadot/app-address-book
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@polkadot/app-addresses",
|
||||
"name": "@polkadot/app-address-book",
|
||||
"version": "0.32.0-beta.5",
|
||||
"main": "index.js",
|
||||
"repository": "https://github.com/polkadot-js/apps.git",
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/app-addresses authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/app-address-book authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
@ -38,7 +38,7 @@ class Creator extends React.PureComponent<Props, State> {
|
||||
const { address } = this.state;
|
||||
|
||||
return (
|
||||
<div className='addresses--Creator'>
|
||||
<div className='address-book--Creator'>
|
||||
<div className='ui--grid'>
|
||||
<AddressSummary
|
||||
className='shrink'
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/app-addresses authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/app-address-book authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
@ -35,7 +35,7 @@ class Editor extends React.PureComponent<Props, State> {
|
||||
render () {
|
||||
const { isForgetOpen, current } = this.state;
|
||||
return (
|
||||
<div className='addresses--Editor'>
|
||||
<div className='address-book--Editor'>
|
||||
<Forgetting
|
||||
isOpen={isForgetOpen}
|
||||
onClose={this.toggleForget}
|
||||
@ -1,4 +1,4 @@
|
||||
/* Copyright 2017-2019 @polkadot/app-addresses authors & contributors
|
||||
/* Copyright 2017-2019 @polkadot/app-address-book authors & contributors
|
||||
/* This software may be modified and distributed under the terms
|
||||
/* of the Apache-2.0 license. See the LICENSE file for details. */
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/app-addresses authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/app-address-book authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
@ -27,7 +27,7 @@ type State = {
|
||||
items: Array<TabItem>
|
||||
};
|
||||
|
||||
class AddressesApp extends React.PureComponent<Props, State> {
|
||||
class AddressBookApp extends React.PureComponent<Props, State> {
|
||||
state: State;
|
||||
|
||||
constructor (props: Props) {
|
||||
@ -35,19 +35,19 @@ class AddressesApp extends React.PureComponent<Props, State> {
|
||||
|
||||
const { allAddresses = {}, t } = props;
|
||||
const baseState = Object.keys(allAddresses).length !== 0
|
||||
? AddressesApp.showEditState()
|
||||
: AddressesApp.hideEditState();
|
||||
? AddressBookApp.showEditState()
|
||||
: AddressBookApp.hideEditState();
|
||||
|
||||
this.state = {
|
||||
...baseState,
|
||||
items: [
|
||||
{
|
||||
name: 'edit',
|
||||
text: t('Edit address')
|
||||
text: t('Edit contact')
|
||||
},
|
||||
{
|
||||
name: 'create',
|
||||
text: t('Add address')
|
||||
text: t('Add contact')
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -71,11 +71,11 @@ class AddressesApp extends React.PureComponent<Props, State> {
|
||||
if (hidden.length === 0) {
|
||||
return hasAddresses
|
||||
? null
|
||||
: AddressesApp.hideEditState();
|
||||
: AddressBookApp.hideEditState();
|
||||
}
|
||||
|
||||
return hasAddresses
|
||||
? AddressesApp.showEditState()
|
||||
? AddressBookApp.showEditState()
|
||||
: null;
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@ class AddressesApp extends React.PureComponent<Props, State> {
|
||||
const renderCreator = this.renderComponent(Creator);
|
||||
|
||||
return (
|
||||
<main className='addresses--App'>
|
||||
<main className='address-book--App'>
|
||||
<header>
|
||||
<Tabs
|
||||
basePath={basePath}
|
||||
@ -123,7 +123,7 @@ class AddressesApp extends React.PureComponent<Props, State> {
|
||||
}
|
||||
|
||||
export default withMulti(
|
||||
AddressesApp,
|
||||
AddressBookApp,
|
||||
translate,
|
||||
withObservable(addressObservable.subject, { propName: 'allAddresses' })
|
||||
);
|
||||
@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2019 @polkadot/app-addresses authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/app-address-book authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { withTranslation } from 'react-i18next';
|
||||
|
||||
export default withTranslation(['addresses', 'ui']);
|
||||
export default withTranslation(['address-book', 'ui']);
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/app-addresses authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/app-address-book authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
@ -1 +0,0 @@
|
||||
# @polkadot/app-addresses
|
||||
@ -4,18 +4,18 @@
|
||||
|
||||
import { Routes } from '../types';
|
||||
|
||||
import Addresses from '@polkadot/app-addresses';
|
||||
import AddressBook from '@polkadot/app-address-book';
|
||||
|
||||
export default ([
|
||||
{
|
||||
Component: Addresses,
|
||||
Component: AddressBook,
|
||||
display: {
|
||||
needsApi: []
|
||||
},
|
||||
i18n: {
|
||||
defaultValue: 'Addresses'
|
||||
defaultValue: 'Address book'
|
||||
},
|
||||
icon: 'address book',
|
||||
name: 'addresses'
|
||||
name: 'addressbook'
|
||||
}
|
||||
] as Routes);
|
||||
@ -8,7 +8,7 @@ import appSettings from '@polkadot/ui-settings';
|
||||
|
||||
import template from './123code';
|
||||
import accounts from './accounts';
|
||||
import addresses from './addresses';
|
||||
import addressbook from './addressbook';
|
||||
import contracts from './contracts';
|
||||
import democracy from './democracy';
|
||||
import explorer from './explorer';
|
||||
@ -27,7 +27,7 @@ const routes: Routes = appSettings.uiMode === 'light'
|
||||
democracy,
|
||||
null,
|
||||
accounts,
|
||||
addresses,
|
||||
addressbook,
|
||||
null,
|
||||
settings,
|
||||
template
|
||||
@ -39,7 +39,7 @@ const routes: Routes = appSettings.uiMode === 'light'
|
||||
democracy,
|
||||
null,
|
||||
accounts,
|
||||
addresses,
|
||||
addressbook,
|
||||
null,
|
||||
contracts,
|
||||
storage,
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
"@polkadot/app-123code/*": [ "packages/app-123code/src/*" ],
|
||||
"@polkadot/app-accounts": [ "packages/app-accounts/src" ],
|
||||
"@polkadot/app-accounts/*": [ "packages/app-accounts/src/*" ],
|
||||
"@polkadot/app-addresses": [ "packages/app-addresses/src" ],
|
||||
"@polkadot/app-addresses/*": [ "packages/app-addresses/src/*" ],
|
||||
"@polkadot/app-address-book": [ "packages/app-address-book/src" ],
|
||||
"@polkadot/app-address-book/*": [ "packages/app-address-book/src/*" ],
|
||||
"@polkadot/app-contracts": [ "packages/app-contracts/src" ],
|
||||
"@polkadot/app-contracts/*": [ "packages/app-contracts/src/*" ],
|
||||
"@polkadot/app-democracy": [ "packages/app-democracy/src" ],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user