Rename the "Addresses" app into "Address book" (#1034)

* change addresses to address book

* rename address into contact
This commit is contained in:
Thibaut Sardan 2019-04-18 12:27:12 +01:00 committed by GitHub
parent bdd046c86e
commit 03089f3f01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 30 additions and 30 deletions

View File

@ -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.

View File

@ -0,0 +1 @@
# @polkadot/app-address-book

View File

@ -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",

View File

@ -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'

View File

@ -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}

View File

@ -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. */

View File

@ -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' })
);

View File

@ -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']);

View File

@ -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.

View File

@ -1 +0,0 @@
# @polkadot/app-addresses

View File

@ -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);

View File

@ -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,

View File

@ -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" ],