diff --git a/js/.babelrc b/js/.babelrc
index 9f44b6bd2..a4f2a2006 100644
--- a/js/.babelrc
+++ b/js/.babelrc
@@ -13,18 +13,19 @@
"retainLines": true,
"env": {
"production": {
- "plugins": ["transform-react-remove-prop-types"]
+ "plugins": [
+ "transform-react-remove-prop-types"
+ ]
},
"development": {
- "plugins": ["react-hot-loader/babel"]
+ "plugins": [
+ "react-hot-loader/babel",
+ ["react-intl", { "messagesDir": "./.build/i18n/" }]
+ ]
},
"test": {
"plugins": [
- [
- "babel-plugin-webpack-alias", {
- "config": "webpack/test.js"
- }
- ]
+ ["babel-plugin-webpack-alias", { "config": "webpack/test.js" }]
]
}
}
diff --git a/js/package.json b/js/package.json
index 9f8eabc2c..525211517 100644
--- a/js/package.json
+++ b/js/package.json
@@ -52,6 +52,7 @@
"babel-eslint": "7.1.1",
"babel-loader": "6.2.8",
"babel-plugin-lodash": "3.2.10",
+ "babel-plugin-react-intl": "2.2.0",
"babel-plugin-transform-class-properties": "6.18.0",
"babel-plugin-transform-decorators-legacy": "1.3.4",
"babel-plugin-transform-object-rest-spread": "6.20.2",
@@ -111,6 +112,7 @@
"react-addons-perf": "15.4.1",
"react-addons-test-utils": "15.4.1",
"react-hot-loader": "3.0.0-beta.6",
+ "react-intl-aggregate-webpack-plugin": "0.0.1",
"rucksack-css": "0.9.1",
"sinon": "1.17.6",
"sinon-as-promised": "4.0.2",
@@ -133,6 +135,7 @@
"ethereumjs-tx": "1.1.4",
"eventemitter3": "2.0.2",
"file-saver": "1.3.3",
+ "flat": "2.0.1",
"format-json": "1.0.3",
"format-number": "2.0.1",
"geopattern": "1.2.3",
@@ -155,6 +158,7 @@
"react-copy-to-clipboard": "4.2.3",
"react-dom": "15.4.1",
"react-dropzone": "3.7.3",
+ "react-intl": "2.1.5",
"react-redux": "4.4.6",
"react-router": "3.0.0",
"react-router-redux": "4.0.7",
diff --git a/js/src/i18n/de/index.js b/js/src/i18n/de/index.js
new file mode 100644
index 000000000..d8c0f9b4b
--- /dev/null
+++ b/js/src/i18n/de/index.js
@@ -0,0 +1,21 @@
+// Copyright 2015, 2016 Ethcore (UK) Ltd.
+// This file is part of Parity.
+
+// Parity is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Parity is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Parity. If not, see .
+
+import settings from './settings';
+
+export default {
+ settings
+};
diff --git a/js/src/i18n/de/settings.js b/js/src/i18n/de/settings.js
new file mode 100644
index 000000000..9142ff9c7
--- /dev/null
+++ b/js/src/i18n/de/settings.js
@@ -0,0 +1,96 @@
+// Copyright 2015, 2016 Ethcore (UK) Ltd.
+// This file is part of Parity.
+
+// Parity is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Parity is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Parity. If not, see .
+
+export default {
+ label: 'Einstellungen',
+
+ background: {
+ label: 'Hintergrund',
+
+ overview_0: 'Dein Hintergrundmuster ist einzigartig und beruht auf deiner Parity-Installation. Es ändert sich immer dann, wenn du ein neues Signer-Token erstellst. So können dezentrale Applicationen keine Vertrauenswürdigkeit vortäuschen.',
+ overview_1: 'Such dir ein Muster aus und merke es dir. Dieses Muster wird dir von nun an immer angezeigt, es sei denn du löschst deinen Browser-Cache oder benutzt ein neues Signer-Token.',
+
+ button_more: 'weitere generieren'
+ },
+
+ parity: {
+ label: 'Parity',
+
+ overview_0: 'Diese Einstellungen verändern das Verhalten deines Parity-Knotens.',
+
+ languages: {
+ label: 'Anzeigesprache',
+ hint: 'Die Sprache, in der dir diese Obefläche angezeigt wird'
+ },
+
+ modes: {
+ label: 'Betriebsmodus',
+ hint: 'Der Synchronisations-Modus deines Parity-Knotens',
+
+ mode_active: 'Parity synchronisiert kontinuierlich die Blockchain',
+ mode_passive: 'Parity synchronisiert zu Beginn, schläft dann und wacht regelmäßig zum Synchronisieren auf',
+ mode_dark: 'Parity synchronisiert nur falls erforderlich, etwa wenn es aus der Ferne aufgerufen wird',
+ mode_offline: 'Parity synchronisiert nicht'
+ }
+ },
+
+ proxy: {
+ label: 'Proxy',
+
+ overview_0: 'Die Proxy-Einstellungen ermöglichen dir einen einfachen Zugriff über einprägsame Adressen, auf die Oberfläche mit all ihren dezentralen Anwendungen.',
+
+ details_0: 'Anstelle des Zugriffs über IP-Adresse und Port wirst du über die .parity-Subdomain auf die Parity-Oberfläche zugreifen können, indem du {homeProxy} besuchst. Dafür musst du folgenden Eintrag in den Proxy-Einstellungen deines Browsers hinzufügen:',
+ details_1: 'Hier findest du Anleitungen zum Anpassen der Proxy-Einstellungen in {windowsLink}, {macOSLink} oder {ubuntuLink}.'
+ },
+
+ views: {
+ label: 'Ansicht',
+
+ overview_0: 'Hier kannst du entscheiden, welche Teile der Parity-Oberfläche dir angezeigt werden sollen.',
+ overview_1: 'Benutzt du Parity ganz normal? Die Standardeinstellungen sind gleichermaßen für Einsteigende als auch für Fortgeschrittene gedacht.',
+ overview_2: 'Entwickelst du mit Parity? Füge zum Beispiel den Reiter "Contracts" zu deiner Ansicht hinzu.',
+ overview_3: 'Bist du Miner oder betreibst du einen großen Knoten? Füge den Reiter "Status" hinzu, um alle Information über den Betrieb deines Knotens im Blick zu halten.',
+
+ accounts: {
+ label: 'Konten',
+ description: 'Eine Liste aller Konten, die mit dieser Parity-Installation verbunden sind. Sende Transaktionen, empfange eingehende Beträge, verwalte deine Kontostände oder lade deine Konten auf.'
+ },
+ addresses: {
+ label: 'Adressbuch',
+ description: 'Eine Liste all deiner Kontakte und der Adressen, die von dieser Parity-Installation verwaltet werden. Überwache Konten und gelange mit nur einem Klick zu Details deiner Transaktionen.'
+ },
+ apps: {
+ label: 'Anwendungen',
+ description: 'Dezentrale Anwendungen, die mit dem Netzwerk interagieren. Füge Anwendungen hinzu, entferne oder öffne Anwendungen.'
+ },
+ contracts: {
+ label: 'Contracts',
+ description: 'Interagiere mit Smart Contracts im Netzwerk. Diese Umgebung ist auf Fortgeschrittene mit gutem Verständnis der Fuktionsweise von Smart Contracts zugeschnitten.'
+ },
+ status: {
+ label: 'Status',
+ description: 'Schau dir an, wie sich dein Parity-Knoten schlägt. Hier findest du zum Beispiel die Anzahl der aktuellen Verbindungen zum Netzwerk, Logs deiner laufenden Instanz und (sofern konfiguriert) Details zum Mining.'
+ },
+ signer: {
+ label: 'Signer',
+ description: 'In diesem sicheren Bereich kannst du Transaktionen, die von dir oder von dezentralen Anwendungen erstellt wurden, prüfen und dann genehmigen oder ablehnen.'
+ },
+ settings: {
+ label: 'Einstellungen',
+ description: 'Diese Seite. Pass die Parity-Oberfläche nach deinen Wünschen an.'
+ }
+ }
+};
diff --git a/js/src/i18n/en/index.js b/js/src/i18n/en/index.js
new file mode 100644
index 000000000..d8c0f9b4b
--- /dev/null
+++ b/js/src/i18n/en/index.js
@@ -0,0 +1,21 @@
+// Copyright 2015, 2016 Ethcore (UK) Ltd.
+// This file is part of Parity.
+
+// Parity is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Parity is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Parity. If not, see .
+
+import settings from './settings';
+
+export default {
+ settings
+};
diff --git a/js/src/i18n/en/settings.js b/js/src/i18n/en/settings.js
new file mode 100644
index 000000000..a0e7c7f1f
--- /dev/null
+++ b/js/src/i18n/en/settings.js
@@ -0,0 +1,63 @@
+// Copyright 2015, 2016 Ethcore (UK) Ltd.
+// This file is part of Parity.
+
+// Parity is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Parity is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Parity. If not, see .
+
+export default {
+ label: 'settings',
+
+ background: {
+ label: 'background'
+ },
+
+ parity: {
+ label: 'parity'
+ },
+
+ proxy: {
+ label: 'proxy'
+ },
+
+ views: {
+ label: 'views',
+
+ accounts: {
+ label: 'Accounts'
+ },
+
+ addresses: {
+ label: 'Addressbook'
+ },
+
+ apps: {
+ label: 'Applications'
+ },
+
+ contracts: {
+ label: 'Contracts'
+ },
+
+ status: {
+ label: 'Status'
+ },
+
+ signer: {
+ label: 'Signer'
+ },
+
+ settings: {
+ label: 'Settings'
+ }
+ }
+};
diff --git a/js/src/i18n/index.js b/js/src/i18n/index.js
new file mode 100644
index 000000000..4ed119c90
--- /dev/null
+++ b/js/src/i18n/index.js
@@ -0,0 +1,21 @@
+// Copyright 2015, 2016 Ethcore (UK) Ltd.
+// This file is part of Parity.
+
+// Parity is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Parity is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Parity. If not, see .
+
+import LocaleStore from './store';
+
+export {
+ LocaleStore
+};
diff --git a/js/src/i18n/languages.js b/js/src/i18n/languages.js
new file mode 100644
index 000000000..f4950e401
--- /dev/null
+++ b/js/src/i18n/languages.js
@@ -0,0 +1,20 @@
+// Copyright 2015, 2016 Ethcore (UK) Ltd.
+// This file is part of Parity.
+
+// Parity is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Parity is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Parity. If not, see .
+
+export default {
+ de: 'Deutsch',
+ en: 'English'
+};
diff --git a/js/src/i18n/store.js b/js/src/i18n/store.js
new file mode 100644
index 000000000..f171497e4
--- /dev/null
+++ b/js/src/i18n/store.js
@@ -0,0 +1,62 @@
+// Copyright 2015, 2016 Ethcore (UK) Ltd.
+// This file is part of Parity.
+
+// Parity is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Parity is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Parity. If not, see .
+
+import flatten from 'flat';
+import { action, observable, transaction } from 'mobx';
+import { addLocaleData } from 'react-intl';
+import de from 'react-intl/locale-data/de';
+import en from 'react-intl/locale-data/en';
+
+import languages from './languages';
+import deMessages from './de';
+import enMessages from './en';
+
+let instance = null;
+const isProduction = process.env.NODE_ENV === 'production';
+
+const DEFAULT = 'en';
+const LANGUAGES = flatten({ languages });
+const MESSAGES = {
+ de: Object.assign(flatten(deMessages), LANGUAGES),
+ en: Object.assign(flatten(enMessages), LANGUAGES)
+};
+const LOCALES = isProduction
+ ? ['en']
+ : ['en', 'de'];
+
+addLocaleData([...de, ...en]);
+
+export default class Store {
+ @observable locale = DEFAULT;
+ @observable locales = LOCALES;
+ @observable messages = MESSAGES[DEFAULT];
+ @observable isDevelopment = !isProduction;
+
+ @action setLocale (locale) {
+ transaction(() => {
+ this.locale = locale;
+ this.messages = MESSAGES[locale];
+ });
+ }
+
+ static get () {
+ if (!instance) {
+ instance = new Store();
+ }
+
+ return instance;
+ }
+}
diff --git a/js/src/ui/ContextProvider/contextProvider.js b/js/src/ui/ContextProvider/contextProvider.js
index 7af6d342e..543730c40 100644
--- a/js/src/ui/ContextProvider/contextProvider.js
+++ b/js/src/ui/ContextProvider/contextProvider.js
@@ -14,8 +14,13 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see .
-import { Component, PropTypes } from 'react';
+import React, { Component, PropTypes } from 'react';
+import { IntlProvider } from 'react-intl';
+import { observer } from 'mobx-react';
+import { LocaleStore } from '../../i18n';
+
+@observer
export default class ContextProvider extends Component {
static propTypes = {
api: PropTypes.object.isRequired,
@@ -30,10 +35,17 @@ export default class ContextProvider extends Component {
store: PropTypes.object
}
+ localeStore = LocaleStore.get();
+
render () {
const { children } = this.props;
+ const { locale, messages } = this.localeStore;
- return children;
+ return (
+
+ { children }
+
+ );
}
getChildContext () {
diff --git a/js/src/ui/Form/Select/select.js b/js/src/ui/Form/Select/select.js
index cb879e3f7..b966f483c 100644
--- a/js/src/ui/Form/Select/select.js
+++ b/js/src/ui/Form/Select/select.js
@@ -17,6 +17,8 @@
import React, { Component, PropTypes } from 'react';
import { SelectField } from 'material-ui';
+import { nodeOrStringProptype } from '~/util/proptypes';
+
// TODO: duplicated in Input
const UNDERLINE_DISABLED = {
borderColor: 'rgba(255, 255, 255, 0.298039)' // 'transparent' // 'rgba(255, 255, 255, 0.298039)'
@@ -33,9 +35,9 @@ export default class Select extends Component {
children: PropTypes.node,
className: PropTypes.string,
disabled: PropTypes.bool,
- error: PropTypes.string,
- hint: PropTypes.string,
- label: PropTypes.string,
+ error: nodeOrStringProptype(),
+ hint: nodeOrStringProptype(),
+ label: nodeOrStringProptype(),
onBlur: PropTypes.func,
onChange: PropTypes.func,
onKeyDown: PropTypes.func,
diff --git a/js/src/ui/LanguageSelector/index.js b/js/src/ui/LanguageSelector/index.js
new file mode 100644
index 000000000..772167d14
--- /dev/null
+++ b/js/src/ui/LanguageSelector/index.js
@@ -0,0 +1,17 @@
+// Copyright 2015, 2016 Ethcore (UK) Ltd.
+// This file is part of Parity.
+
+// Parity is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Parity is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Parity. If not, see .
+
+export default from './languageSelector';
diff --git a/js/src/ui/LanguageSelector/languageSelector.js b/js/src/ui/LanguageSelector/languageSelector.js
new file mode 100644
index 000000000..db8949510
--- /dev/null
+++ b/js/src/ui/LanguageSelector/languageSelector.js
@@ -0,0 +1,71 @@
+// Copyright 2015, 2016 Ethcore (UK) Ltd.
+// This file is part of Parity.
+
+// Parity is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Parity is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Parity. If not, see .
+
+import React, { Component } from 'react';
+import { FormattedMessage } from 'react-intl';
+import { MenuItem } from 'material-ui';
+import { observer } from 'mobx-react';
+
+import Select from '../Form/Select';
+import { LocaleStore } from '../../i18n';
+
+@observer
+export default class LanguageSelector extends Component {
+ store = LocaleStore.get();
+
+ render () {
+ if (!this.store.isDevelopment) {
+ return null;
+ }
+
+ return (
+
+ }
+ label={
+
+ }
+ value={ this.store.locale }
+ onChange={ this.onChange }>
+ { this.renderOptions() }
+
+ );
+ }
+
+ renderOptions () {
+ return this.store.locales.map((locale) => {
+ const label = ;
+
+ return (
+
+ );
+ });
+ }
+
+ onChange = (event, index, locale) => {
+ this.store.setLocale(locale);
+ }
+}
diff --git a/js/src/ui/index.js b/js/src/ui/index.js
index c5a965458..7cf3e7ee5 100644
--- a/js/src/ui/index.js
+++ b/js/src/ui/index.js
@@ -34,6 +34,7 @@ import Form, { AddressSelect, FormWrap, TypedInput, Input, InputAddress, InputAd
import GasPriceEditor from './GasPriceEditor';
import IdentityIcon from './IdentityIcon';
import IdentityName from './IdentityName';
+import LanguageSelector from './LanguageSelector';
import Loading from './Loading';
import MethodDecoding from './MethodDecoding';
import Modal, { Busy as BusyStep, Completed as CompletedStep } from './Modal';
@@ -74,10 +75,10 @@ export {
InputAddressSelect,
InputChip,
InputInline,
- Loading,
- Select,
IdentityIcon,
IdentityName,
+ LanguageSelector,
+ Loading,
MethodDecoding,
Modal,
BusyStep,
@@ -87,6 +88,7 @@ export {
ParityBackground,
RadioButtons,
ShortenedHash,
+ Select,
SignerIcon,
Tags,
Tooltip,
diff --git a/js/src/views/Application/TabBar/tabBar.js b/js/src/views/Application/TabBar/tabBar.js
index 63f569f1f..ad2bfb779 100644
--- a/js/src/views/Application/TabBar/tabBar.js
+++ b/js/src/views/Application/TabBar/tabBar.js
@@ -15,6 +15,7 @@
// along with Parity. If not, see .
import React, { Component, PropTypes } from 'react';
+import { FormattedMessage } from 'react-intl';
import { connect } from 'react-redux';
import { Link } from 'react-router';
import { Toolbar, ToolbarGroup } from 'material-ui/Toolbar';
@@ -23,85 +24,57 @@ import { isEqual } from 'lodash';
import { Badge, Tooltip } from '~/ui';
+import imagesEthcoreBlock from '~/../assets/images/parity-logo-white-no-text.svg';
+
import styles from './tabBar.css';
-import imagesEthcoreBlock from '../../../../assets/images/parity-logo-white-no-text.svg';
class Tab extends Component {
static propTypes = {
- view: PropTypes.object,
children: PropTypes.node,
- pendings: PropTypes.number
+ pendings: PropTypes.number,
+ view: PropTypes.object
};
- shouldComponentUpdate (nextProps) {
- return (nextProps.view.id === 'signer' && nextProps.pendings !== this.props.pendings);
- }
-
render () {
const { view, children } = this.props;
- const label = this.getLabel(view);
-
return (
+ label={
+ view.id === 'signer'
+ ? this.renderSignerLabel(view.id)
+ : this.renderLabel(view.id)
+ }>
{ children }
);
}
- getLabel (view) {
- const { label } = view;
-
- if (view.id === 'signer') {
- return this.renderSignerLabel(label);
- }
-
- if (view.id === 'status') {
- return this.renderStatusLabel(label);
- }
-
- return this.renderLabel(label);
- }
-
- renderLabel (name, bubble) {
+ renderLabel (id, bubble) {
return (
- { name }
+
{ bubble }
);
}
- renderSignerLabel (label) {
+ renderSignerLabel (id) {
const { pendings } = this.props;
+ let bubble;
if (pendings) {
- const bubble = (
+ bubble = (
);
-
- return this.renderLabel(label, bubble);
}
- return this.renderLabel(label);
- }
-
- renderStatusLabel (label) {
- // const { isTest, netChain } = this.props;
- // const bubble = (
- //
- // );
-
- return this.renderLabel(label, null);
+ return this.renderLabel(id, bubble);
}
}
@@ -111,28 +84,19 @@ class TabBar extends Component {
};
static propTypes = {
- views: PropTypes.array.isRequired,
- pending: PropTypes.array,
isTest: PropTypes.bool,
- netChain: PropTypes.string
+ netChain: PropTypes.string,
+ pending: PropTypes.array,
+ views: PropTypes.array.isRequired
};
static defaultProps = {
pending: []
};
- shouldComponentUpdate (nextProps, nextState) {
- const prevViews = this.props.views.map((v) => v.id).sort();
- const nextViews = nextProps.views.map((v) => v.id).sort();
-
- return (nextProps.pending.length !== this.props.pending.length) ||
- (!isEqual(prevViews, nextViews));
- }
-
render () {
return (
-
+
{ this.renderLogo() }
{ this.renderTabs() }
{ this.renderLast() }
@@ -167,21 +131,20 @@ class TabBar extends Component {
.map((view, index) => {
const body = (view.id === 'accounts')
? (
-
+
)
: null;
return (
+ className={ styles.tabLink }key={ view.id }
+ to={ view.route }>
+ view={ view }>
{ body }
@@ -203,11 +166,10 @@ function mapStateToProps (initState) {
.keys(views)
.filter((id) => views[id].fixed || views[id].active);
- let filteredViews = filteredViewIds
- .map((id) => ({
- ...views[id],
- id
- }));
+ let filteredViews = filteredViewIds.map((id) => ({
+ ...views[id],
+ id
+ }));
return (state) => {
const { views } = state.settings;
@@ -221,11 +183,10 @@ function mapStateToProps (initState) {
}
filteredViewIds = viewIds;
- filteredViews = viewIds
- .map((id) => ({
- ...views[id],
- id
- }));
+ filteredViews = viewIds.map((id) => ({
+ ...views[id],
+ id
+ }));
return { views: filteredViews };
};
diff --git a/js/src/views/Dapps/AddDapps/AddDapps.js b/js/src/views/Dapps/AddDapps/AddDapps.js
index 71d03dc50..d3876998a 100644
--- a/js/src/views/Dapps/AddDapps/AddDapps.js
+++ b/js/src/views/Dapps/AddDapps/AddDapps.js
@@ -15,6 +15,7 @@
// along with Parity. If not, see .
import React, { Component, PropTypes } from 'react';
+import { FormattedMessage } from 'react-intl';
import { observer } from 'mobx-react';
import DoneIcon from 'material-ui/svg-icons/action/done';
import { List, ListItem } from 'material-ui/List';
@@ -39,22 +40,56 @@ export default class AddDapps extends Component {
return (
+ }
actions={ [
+ }
key='done'
onClick={ store.closeModal }
icon={ }
/>
- ] }
- visible
- >
+ ] }>
- { this.renderList(store.sortedLocal, 'Applications locally available', 'All applications installed locally on the machine by the user for access by the Parity client.') }
- { this.renderList(store.sortedBuiltin, 'Applications bundled with Parity', 'Experimental applications developed by the Parity team to show off dapp capabilities, integration, experimental features and to control certain network-wide client behaviour.') }
- { this.renderList(store.sortedNetwork, 'Applications on the global network', 'These applications are not affiliated with Parity nor are they published by Parity. Each remain under the control of their respective authors. Please ensure that you understand the goals for each application before interacting.') }
+ {
+ this.renderList(store.sortedLocal,
+ ,
+
+ )
+ }
+ {
+ this.renderList(store.sortedBuiltin,
+ ,
+
+ )
+ }
+ {
+ this.renderList(store.sortedNetwork,
+ ,
+
+ )
+ }
);
}
diff --git a/js/src/views/Dapps/dapps.js b/js/src/views/Dapps/dapps.js
index b0b731b93..160bb44b0 100644
--- a/js/src/views/Dapps/dapps.js
+++ b/js/src/views/Dapps/dapps.js
@@ -15,6 +15,7 @@
// along with Parity. If not, see .
import React, { Component, PropTypes } from 'react';
+import { FormattedMessage } from 'react-intl';
import { Checkbox } from 'material-ui';
import { observer } from 'mobx-react';
@@ -43,11 +44,19 @@ export default class Dapps extends Component {
externalOverlay = (
-
Applications made available on the network by 3rd-party authors are not affiliated with Parity nor are they published by Parity. Each remain under the control of their respective authors. Please ensure that you understand the goals for each before interacting.
@@ -61,10 +70,18 @@ export default class Dapps extends Component {
+ }
buttons={ [
+ }
key='edit'
icon={ }
onTouchTap={ this.store.openModal }
diff --git a/js/src/views/Settings/Background/background.js b/js/src/views/Settings/Background/background.js
index 0551a6145..add58d820 100644
--- a/js/src/views/Settings/Background/background.js
+++ b/js/src/views/Settings/Background/background.js
@@ -15,6 +15,7 @@
// along with Parity. If not, see .
import React, { Component, PropTypes } from 'react';
+import { FormattedMessage } from 'react-intl';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import NavigationRefresh from 'material-ui/svg-icons/navigation/refresh';
@@ -55,15 +56,29 @@ class Background extends Component {
render () {
return (
-
+
+ }>
-
The background pattern you can see right now is unique to your Parity installation. It will change every time you create a new Signer token. This is so that decentralized applications cannot pretend to be trustworthy.
-
Pick a pattern you like and memorize it. This Pattern will always be shown from now on, unless you clear your browser cache or use a new Signer token.
The proxy setup allows you to access Parity and all associated decentralized applications via memorable addresses.
+
+
+
-
Instead of accessing Parity via the IP address and port, you will be able to access it via the .parity subdomain, by visiting http://home.parity/. To setup subdomain-based routing, you need to add the relevant proxy entries to your browser,
diff --git a/js/src/views/Settings/Views/defaults.js b/js/src/views/Settings/Views/defaults.js
index dce593d2b..9c7971ce5 100644
--- a/js/src/views/Settings/Views/defaults.js
+++ b/js/src/views/Settings/Views/defaults.js
@@ -28,66 +28,52 @@ const defaultViews = {
active: true,
fixed: true,
icon: ,
- label: 'Accounts',
route: '/accounts',
- value: 'account',
- description: 'A list of all the accounts associated to and imported into this Parity instance. Send transactions, receive incoming values, manage your balances and fund your accounts.'
+ value: 'account'
},
addresses: {
active: true,
icon: ,
- label: 'Addressbook',
route: '/addresses',
- value: 'address',
- description: 'A list of all contacts and address book entries that is managed by this Parity instance. Watch accounts and have the details available at the click of a button when transacting.'
+ value: 'address'
},
apps: {
active: true,
icon: ,
- label: 'Applications',
route: '/apps',
- value: 'app',
- description: 'Distributed applications that interact with the underlying network. Add applications, manage you application portfolio and interact with application from around the network.'
+ value: 'app'
},
contracts: {
active: false,
icon: ,
- label: 'Contracts',
route: '/contracts',
- value: 'contract',
- description: 'Watch and interact with specific contracts that have been deployed on the network. This is a more technically-focused environment, specifically for advanced users that understand the inner working of certain contracts.'
+ value: 'contract'
},
status: {
active: false,
icon: ,
- label: 'Status',
route: '/status',
- value: 'status',
- description: 'See how the Parity node is performing in terms of connections to the network, logs from the actual running instance and details of mining (if enabled and configured).'
+ value: 'status'
},
signer: {
active: true,
fixed: true,
icon: ,
- label: 'Signer',
route: '/signer',
- value: 'signer',
- description: 'The secure transaction management area of the application where you can approve any outgoing transactions made from the application as well as those placed into the queue by distributed applications.'
+ value: 'signer'
},
settings: {
active: true,
fixed: true,
icon: ,
- label: 'Settings',
route: '/settings',
- value: 'settings',
- description: 'This view. Allows you to customize the application in term of options, operation and look and feel.'
+ value: 'settings'
}
};
diff --git a/js/src/views/Settings/Views/views.js b/js/src/views/Settings/Views/views.js
index 261109664..125239687 100644
--- a/js/src/views/Settings/Views/views.js
+++ b/js/src/views/Settings/Views/views.js
@@ -15,6 +15,7 @@
// along with Parity. If not, see .
import React, { Component, PropTypes } from 'react';
+import { FormattedMessage } from 'react-intl';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { Checkbox } from 'material-ui';
@@ -34,16 +35,96 @@ class Views extends Component {
render () {
return (
-
+
+ }>
-
Manage the available application views, using only the parts of the application that is applicable to you.
-
Are you an end-user? The defaults are setups for both beginner and advanced users alike.
-
Are you a developer? Add some features to manage contracts are interact with application deployments.
-
Are you a miner or run a large-scale node? Add the features to give you all the information needed to watch the node operation.