+
+
+
+
+ Dapp Registry
+
+
+
+
+
+
+
+
+
diff --git a/js/src/dapps/dappreg.js b/js/src/dapps/dappreg.js
new file mode 100644
index 000000000..243576a34
--- /dev/null
+++ b/js/src/dapps/dappreg.js
@@ -0,0 +1,35 @@
+// 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 from 'react';
+import ReactDOM from 'react-dom';
+import injectTapEventPlugin from 'react-tap-event-plugin';
+import { useStrict } from 'mobx';
+
+injectTapEventPlugin();
+useStrict(true);
+
+import Application from './dappreg/Application';
+
+import '../../assets/fonts/Roboto/font.css';
+import '../../assets/fonts/RobotoMono/font.css';
+import './style.css';
+import './dappreg.html';
+
+ReactDOM.render(
+ ,
+ document.querySelector('#container')
+);
diff --git a/js/src/dapps/dappreg/Application/application.css b/js/src/dapps/dappreg/Application/application.css
new file mode 100644
index 000000000..f171d8127
--- /dev/null
+++ b/js/src/dapps/dappreg/Application/application.css
@@ -0,0 +1,58 @@
+/* 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 .
+*/
+
+.body {
+ color: #333;
+ background: #eee;
+ padding: 4.5em 0;
+ text-align: center;
+}
+
+.apps {
+ background: #fff;
+ border-radius: 0.5em;
+ margin: 0 auto;
+ max-width: 980px;
+ padding: 1.5em;
+ text-align: left;
+}
+
+.footer {
+ font-size: 0.75em;
+ margin: 1em;
+ padding: 1.5em;
+ text-align: center;
+}
+
+.header {
+ background: #44e;
+ border-radius: 0 0 0.25em 0.25em;
+ color: #fff;
+ left: 0;
+ padding: 1em;
+ position: fixed;
+ right: 0;
+ top: 0;
+ z-index: 25;
+}
+
+.loading {
+ text-align: center;
+ padding-top: 5em;
+ font-size: 2em;
+ color: #999;
+}
diff --git a/js/src/dapps/dappreg/Application/application.js b/js/src/dapps/dappreg/Application/application.js
new file mode 100644
index 000000000..b5e4d5a97
--- /dev/null
+++ b/js/src/dapps/dappreg/Application/application.js
@@ -0,0 +1,64 @@
+// 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 { observer } from 'mobx-react';
+
+import DappsStore from '../dappsStore';
+
+import ButtonBar from '../ButtonBar';
+import Dapp from '../Dapp';
+import ModalDelete from '../ModalDelete';
+import ModalRegister from '../ModalRegister';
+import ModalUpdate from '../ModalUpdate';
+import SelectDapp from '../SelectDapp';
+import Warning from '../Warning';
+import styles from './application.css';
+
+@observer
+export default class Application extends Component {
+ dappsStore = DappsStore.instance();
+
+ render () {
+ if (this.dappsStore.isLoading) {
+ return (
+
+ Loading application
+
+ );
+ }
+
+ return (
+
+
+ DAPP REGISTRY, a global view of distributed applications available on the network. Putting the puzzle together.
+
+
+
+
+
+
+
+ { this.dappsStore.count } applications registered, { this.dappsStore.ownedCount } owned by user
+
+
+
+
+
+
+ );
+ }
+}
diff --git a/js/src/dapps/dappreg/Application/index.js b/js/src/dapps/dappreg/Application/index.js
new file mode 100644
index 000000000..236578226
--- /dev/null
+++ b/js/src/dapps/dappreg/Application/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 './application';
diff --git a/js/src/dapps/dappreg/Button/button.css b/js/src/dapps/dappreg/Button/button.css
new file mode 100644
index 000000000..a66736e46
--- /dev/null
+++ b/js/src/dapps/dappreg/Button/button.css
@@ -0,0 +1,38 @@
+/* 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 .
+*/
+
+.button {
+ background: #44e;
+ border: none;
+ border-radius: 0.25em;
+ color: #fff;
+ cursor: pointer;
+ font-size: 1em;
+ margin: 1em 0.375em;
+ opacity: 0.85;
+ padding: 0.75em 2em;
+
+ &[disabled] {
+ opacity: 0.5;
+ cursor: default;
+ background: #aaa;
+ }
+
+ &[data-warning="true"] {
+ background: #e44;
+ }
+}
diff --git a/js/src/dapps/dappreg/Button/button.js b/js/src/dapps/dappreg/Button/button.js
new file mode 100644
index 000000000..1f3b67b4c
--- /dev/null
+++ b/js/src/dapps/dappreg/Button/button.js
@@ -0,0 +1,52 @@
+// 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, PropTypes } from 'react';
+
+import styles from './button.css';
+
+export default class Button extends Component {
+ static propTypes = {
+ className: PropTypes.string,
+ disabled: PropTypes.bool,
+ label: PropTypes.string.isRequired,
+ warning: PropTypes.bool,
+ onClick: PropTypes.func.isRequired
+ }
+
+ render () {
+ const { className, disabled, label, warning } = this.props;
+ const classes = `${styles.button} ${className}`;
+
+ return (
+
+ );
+ }
+
+ onClick = (event) => {
+ if (this.props.disabled) {
+ return;
+ }
+
+ this.props.onClick(event);
+ }
+}
diff --git a/js/src/dapps/dappreg/Button/index.js b/js/src/dapps/dappreg/Button/index.js
new file mode 100644
index 000000000..f69a65e3d
--- /dev/null
+++ b/js/src/dapps/dappreg/Button/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 './button';
diff --git a/js/src/dapps/dappreg/ButtonBar/buttonBar.css b/js/src/dapps/dappreg/ButtonBar/buttonBar.css
new file mode 100644
index 000000000..0aa84ee29
--- /dev/null
+++ b/js/src/dapps/dappreg/ButtonBar/buttonBar.css
@@ -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 .
+*/
+
+.buttonbar {
+ text-align: center;
+ margin: 1em 0 0 0;
+}
diff --git a/js/src/dapps/dappreg/ButtonBar/buttonBar.js b/js/src/dapps/dappreg/ButtonBar/buttonBar.js
new file mode 100644
index 000000000..289def0ea
--- /dev/null
+++ b/js/src/dapps/dappreg/ButtonBar/buttonBar.js
@@ -0,0 +1,101 @@
+// 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 { observer } from 'mobx-react';
+
+import DappsStore from '../dappsStore';
+import ModalStore from '../modalStore';
+
+import Button from '../Button';
+import styles from './buttonBar.css';
+
+@observer
+export default class ButtonBar extends Component {
+ dappsStore = DappsStore.instance();
+ modalStore = ModalStore.instance();
+
+ render () {
+ let buttons = [];
+
+ if (this.dappsStore.isEditing || this.dappsStore.isNew) {
+ buttons = [
+ ,
+
+ ];
+ } else {
+ buttons = [
+ ,
+ ,
+
+ ];
+ }
+
+ return (
+
+ { buttons }
+
+ );
+ }
+
+ onCancelClick = () => {
+ if (this.dappsStore.isEditing) {
+ this.dappsStore.setEditing(false);
+ } else {
+ this.dappsStore.setNew(false);
+ }
+ }
+
+ onDeleteClick = () => {
+ this.modalStore.showDelete();
+ }
+
+ onEditClick = () => {
+ this.dappsStore.setEditing(true);
+ }
+
+ onNewClick = () => {
+ this.dappsStore.setNew(true);
+ }
+
+ onSaveClick = () => {
+ if (this.dappsStore.isEditing) {
+ this.modalStore.showUpdate();
+ } else {
+ this.modalStore.showRegister();
+ }
+ }
+}
diff --git a/js/src/dapps/dappreg/ButtonBar/index.js b/js/src/dapps/dappreg/ButtonBar/index.js
new file mode 100644
index 000000000..d48f63208
--- /dev/null
+++ b/js/src/dapps/dappreg/ButtonBar/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 './buttonBar';
diff --git a/js/src/dapps/dappreg/Dapp/dapp.css b/js/src/dapps/dappreg/Dapp/dapp.css
new file mode 100644
index 000000000..0fef89cab
--- /dev/null
+++ b/js/src/dapps/dappreg/Dapp/dapp.css
@@ -0,0 +1,19 @@
+/* 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 .
+*/
+
+.app {
+}
diff --git a/js/src/dapps/dappreg/Dapp/dapp.js b/js/src/dapps/dappreg/Dapp/dapp.js
new file mode 100644
index 000000000..31d889868
--- /dev/null
+++ b/js/src/dapps/dappreg/Dapp/dapp.js
@@ -0,0 +1,162 @@
+// 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 { observer } from 'mobx-react';
+
+import { api } from '../parity';
+import DappsStore from '../dappsStore';
+
+import Input from '../Input';
+import SelectAccount from '../SelectAccount';
+import styles from './dapp.css';
+
+@observer
+export default class Dapp extends Component {
+ dappsStore = DappsStore.instance();
+
+ render () {
+ const app = this.dappsStore.isNew || this.dappsStore.isEditing
+ ? this.dappsStore.wipApp
+ : this.dappsStore.currentApp;
+
+ return (
+
+ );
+ }
+
+ renderInputs (app) {
+ if (this.dappsStore.isNew) {
+ return null;
+ }
+
+ return [
+ this.renderHashInput(app, 'image', 'Image hash, as generated by Githubhint', true),
+ this.renderHashInput(app, 'manifest', 'Manifest hash, as generated by Githubhint'),
+ this.renderHashInput(app, 'content', 'Content hash, as generated by Githubhint')
+ ];
+ }
+
+ renderOwnerSelect (app) {
+ const overlayImage = (
+
+ );
+
+ return (
+
+
+
+ );
+ }
+
+ renderOwnerStatic (app) {
+ const overlayImage = (
+
+ );
+
+ return (
+
+
+
+ );
+ }
+
+ renderHashInput (app, type, label, withImage = false) {
+ const onChange = (event) => this.onChangeHash(event, type);
+ const hash = app[`${type}Hash`];
+
+ let overlayImage = null;
+ if (withImage && hash) {
+ overlayImage = (
+
+ );
+ }
+
+ return (
+
+
+
+ );
+ }
+
+ onChangeHash (event, type) {
+ if (!this.dappsStore.isNew && !this.dappsStore.isEditing) {
+ return;
+ }
+
+ const hash = event.target.value;
+ let changed = false;
+ let url = null;
+
+ if (this.dappsStore.isNew) {
+ if (hash && hash.length) {
+ changed = true;
+ }
+ } else {
+ if (this.dappsStore.currentApp[`${type}Hash`] !== hash) {
+ changed = true;
+ } else {
+ url = this.dappsStore.currentApp[`${type}Url`];
+ }
+ }
+
+ this.dappsStore.editWip({
+ [`${type}Changed`]: changed,
+ [`${type}Error`]: null,
+ [`${type}Hash`]: hash,
+ [`${type}Url`]: changed ? 'Resolving url from hash' : url
+ });
+
+ if (changed) {
+ if (hash.length) {
+ this.dappsStore
+ .lookupHash(hash)
+ .then((url) => {
+ this.dappsStore.editWip({
+ [`${type}Error`]: url ? null : 'Unable to resolve url',
+ [`${type}Url`]: url
+ });
+ });
+ } else {
+ this.dappsStore.editWip({ [`${type}Url`]: null });
+ }
+ }
+ }
+}
diff --git a/js/src/dapps/dappreg/Dapp/index.js b/js/src/dapps/dappreg/Dapp/index.js
new file mode 100644
index 000000000..6fbb5df27
--- /dev/null
+++ b/js/src/dapps/dappreg/Dapp/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 './dapp';
diff --git a/js/src/dapps/dappreg/Input/index.js b/js/src/dapps/dappreg/Input/index.js
new file mode 100644
index 000000000..3d9d9293e
--- /dev/null
+++ b/js/src/dapps/dappreg/Input/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 './input';
diff --git a/js/src/dapps/dappreg/Input/input.css b/js/src/dapps/dappreg/Input/input.css
new file mode 100644
index 000000000..bd453a510
--- /dev/null
+++ b/js/src/dapps/dappreg/Input/input.css
@@ -0,0 +1,92 @@
+/* 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 .
+*/
+
+.input {
+ position: relative;
+
+ input, select {
+ background: rgba(255, 255, 255, 0.85);
+ border: 4px solid rgba(223, 223, 223, 0.85);
+ border-radius: 0.25em;
+ box-sizing: border-box;
+ color: #333;
+ font-size: 1em;
+ margin: 0.25em 0 0.25em 0;
+ padding: 0.5em 0.5em 1.5em 0.5em;
+ width: 100%;
+ }
+
+ input {
+ padding-bottom: 1.5em;
+
+ &[data-dirty="true"] {
+ background: rgba(255, 255, 203, 0.85);
+ border-color: rgba(203, 203, 151, 0.85);
+ }
+
+ &[data-error="true"] {
+ background: rgba(255, 223, 223, 0.85) !important;
+ border-color: rgba(223, 191, 191, 0.85) !important;
+ }
+
+ &[readonly] {
+ background: rgba(239, 239, 239, 0.85);
+ border-color: rgba(223, 223, 223, 0.85);
+ }
+ }
+
+ label {
+ color: #888;
+ display: block;
+ font-size: 0.75em;
+ margin-top: 1.5em;
+ }
+
+ select {
+ -moz-appearance: none;
+ -webkit-appearance: none;
+ appearance: none;
+ height: 58px;
+
+ &[disabled] {
+ background: rgba(239, 239, 239, 0.85);
+ border-color: rgba(223, 223, 223, 0.85);
+ }
+ }
+
+ .hint {
+ color: #888;
+ display: block;
+ font-size: 0.75em;
+ position: absolute;
+ right: 52px;
+ text-align: right;
+ top: 52px;
+ }
+
+ .overlay {
+ right: 10px;
+ position: absolute;
+ top: 30px;
+
+ img {
+ border-radius: 50%;
+ height: 32px;
+ width: 32px;
+ }
+ }
+}
diff --git a/js/src/dapps/dappreg/Input/input.js b/js/src/dapps/dappreg/Input/input.js
new file mode 100644
index 000000000..72e046afb
--- /dev/null
+++ b/js/src/dapps/dappreg/Input/input.js
@@ -0,0 +1,47 @@
+// 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, PropTypes } from 'react';
+
+import styles from './input.css';
+
+export default class Input extends Component {
+ static propTypes = {
+ children: PropTypes.node.isRequired,
+ hint: PropTypes.string,
+ label: PropTypes.string.isRequired,
+ overlay: PropTypes.node
+ }
+
+ render () {
+ const { children, hint, label, overlay } = this.props;
+
+ return (
+
+
+ { children }
+
+ { hint }
+
+
+ { overlay }
+
+
+ );
+ }
+}
diff --git a/js/src/dapps/dappreg/Modal/index.js b/js/src/dapps/dappreg/Modal/index.js
new file mode 100644
index 000000000..1e75d9fd8
--- /dev/null
+++ b/js/src/dapps/dappreg/Modal/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 './modal';
diff --git a/js/src/dapps/dappreg/Modal/modal.css b/js/src/dapps/dappreg/Modal/modal.css
new file mode 100644
index 000000000..9c40393b2
--- /dev/null
+++ b/js/src/dapps/dappreg/Modal/modal.css
@@ -0,0 +1,116 @@
+/* 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 .
+*/
+
+.modal {
+ .body {
+ bottom: 0;
+ left: 0;
+ position: fixed;
+ right: 0;
+ top: 0;
+ text-align: center;
+ z-index: 50;
+
+ .dialog {
+ background: #fff;
+ border-radius: 0 0 0.25em 0.25em;
+ margin: 0 auto;
+ max-width: 840px;
+ text-align: left;
+
+ .content {
+ line-height: 1.5em;
+ padding: 2em;
+ text-align: center;
+
+ .section {
+ margin: 0;
+ padding: 0;
+
+ &.error {
+ color: #f44;
+ }
+ }
+
+ .section+.section {
+ margin-top: 1em;
+ }
+ }
+
+ .footer {
+ padding: 0.5em 1.625em;
+ text-align: right;
+ }
+
+ .header {
+ background: #44e;
+ color: #fff;
+ opacity: 0.85;
+ padding: 1em;
+
+ &.error {
+ background: #e44;
+ }
+ }
+ }
+ }
+
+ .overlay {
+ background: rgba(204, 204, 204, 0.7);
+ bottom: 0;
+ left: 0;
+ position: fixed;
+ right: 0;
+ top: 0;
+ z-index: 49;
+ }
+}
+
+.account {
+ div {
+ display: inline-block;
+ vertical-align: top;
+ }
+
+ img {
+ border-radius: 50%;
+ margin-right: 0.5em;
+ }
+}
+
+.hint {
+ display: block !important;
+ color: #888;
+ font-size: 0.75em;
+ margin-top: -0.5em;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.center {
+ text-align: center;
+}
+
+.heading {
+ color: #888;
+ font-size: 0.75em;
+}
+
+.light {
+ color: #888;
+}
diff --git a/js/src/dapps/dappreg/Modal/modal.js b/js/src/dapps/dappreg/Modal/modal.js
new file mode 100644
index 000000000..7701695d7
--- /dev/null
+++ b/js/src/dapps/dappreg/Modal/modal.js
@@ -0,0 +1,66 @@
+// 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, PropTypes } from 'react';
+
+import styles from './modal.css';
+
+export default class Modal extends Component {
+ static propTypes = {
+ buttons: PropTypes.node,
+ children: PropTypes.node,
+ error: PropTypes.object,
+ header: PropTypes.string
+ }
+
+ render () {
+ const { children, buttons, error, header } = this.props;
+
+ return (
+
+ Your operation failed to complete sucessfully. The following error was returned:
+
+
+ { error.toString() }
+
+
+ );
+ }
+}
diff --git a/js/src/dapps/dappreg/ModalDelete/index.js b/js/src/dapps/dappreg/ModalDelete/index.js
new file mode 100644
index 000000000..bb321ce2c
--- /dev/null
+++ b/js/src/dapps/dappreg/ModalDelete/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 './modalDelete';
diff --git a/js/src/dapps/dappreg/ModalDelete/modalDelete.js b/js/src/dapps/dappreg/ModalDelete/modalDelete.js
new file mode 100644
index 000000000..3a3a8ee52
--- /dev/null
+++ b/js/src/dapps/dappreg/ModalDelete/modalDelete.js
@@ -0,0 +1,159 @@
+// 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 { observer } from 'mobx-react';
+
+import { api } from '../parity';
+import DappsStore from '../dappsStore';
+import ModalStore from '../modalStore';
+
+import Button from '../Button';
+import Modal from '../Modal';
+
+import styles from '../Modal/modal.css';
+
+const HEADERS = [
+ 'Error During Deletion',
+ 'Confirm Application Deletion',
+ 'Waiting for Signer Confirmation',
+ 'Waiting for Transaction Receipt',
+ 'Deletion Completed'
+];
+const STEP_ERROR = 0;
+const STEP_CONFIRM = 1;
+const STEP_SIGNER = 2;
+const STEP_TXRECEIPT = 3;
+const STEP_DONE = 4;
+
+@observer
+export default class ModalDelete extends Component {
+ dappsStore = DappsStore.instance();
+ modalStore = ModalStore.instance();
+
+ render () {
+ if (!this.modalStore.showingDelete) {
+ return null;
+ }
+
+ return (
+
+ { this.renderStep() }
+
+ );
+ }
+
+ renderButtons () {
+ switch (this.modalStore.stepDelete) {
+ case STEP_ERROR:
+ case STEP_DONE:
+ return [
+
+ ];
+ case STEP_CONFIRM:
+ return [
+ ,
+
+ ];
+ default:
+ return null;
+ }
+ }
+
+ renderStep () {
+ switch (this.modalStore.stepDelete) {
+ case STEP_CONFIRM:
+ return this.renderStepConfirm();
+ case STEP_SIGNER:
+ return this.renderStepWait('Waiting for transaction confirmation in the Parity secure signer');
+ case STEP_TXRECEIPT:
+ return this.renderStepWait('Waiting for the transaction receipt from the network');
+ case STEP_DONE:
+ return this.renderStepCompleted();
+ default:
+ return null;
+ }
+ }
+
+ renderStepCompleted () {
+ return (
+
+
+ Your application has been removed from the registry.
+
+
+ );
+ }
+
+ renderStepConfirm () {
+ return (
+
+
+ You are about to remove a distributed application from the registry, the details of this application is given below. Removal does not return any fees, however the application will not be available to users anymore.
+
+ );
+ }
+
+ onClickClose = () => {
+ this.modalStore.hideDelete();
+ }
+
+ onClickYes = () => {
+ this.modalStore.doDelete();
+ }
+}
diff --git a/js/src/dapps/dappreg/ModalRegister/index.js b/js/src/dapps/dappreg/ModalRegister/index.js
new file mode 100644
index 000000000..aae13fd7d
--- /dev/null
+++ b/js/src/dapps/dappreg/ModalRegister/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 './modalRegister';
diff --git a/js/src/dapps/dappreg/ModalRegister/modalRegister.js b/js/src/dapps/dappreg/ModalRegister/modalRegister.js
new file mode 100644
index 000000000..53d1806e1
--- /dev/null
+++ b/js/src/dapps/dappreg/ModalRegister/modalRegister.js
@@ -0,0 +1,159 @@
+// 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 { observer } from 'mobx-react';
+
+import { api } from '../parity';
+import DappsStore from '../dappsStore';
+import ModalStore from '../modalStore';
+
+import Button from '../Button';
+import Modal from '../Modal';
+
+import styles from '../Modal/modal.css';
+
+const HEADERS = [
+ 'Error During Registration',
+ 'Confirm Application Registration',
+ 'Waiting for Signer Confirmation',
+ 'Waiting for Transaction Receipt',
+ 'Registration Completed'
+];
+const STEP_ERROR = 0;
+const STEP_CONFIRM = 1;
+const STEP_SIGNER = 2;
+const STEP_TXRECEIPT = 3;
+const STEP_DONE = 4;
+
+@observer
+export default class ModalRegister extends Component {
+ dappsStore = DappsStore.instance();
+ modalStore = ModalStore.instance();
+
+ render () {
+ if (!this.modalStore.showingRegister) {
+ return null;
+ }
+
+ return (
+
+ { this.renderStep() }
+
+ );
+ }
+
+ renderButtons () {
+ switch (this.modalStore.stepRegister) {
+ case STEP_ERROR:
+ case STEP_DONE:
+ return [
+
+ ];
+ case STEP_CONFIRM:
+ return [
+ ,
+
+ ];
+ default:
+ return null;
+ }
+ }
+
+ renderStep () {
+ switch (this.modalStore.stepRegister) {
+ case STEP_CONFIRM:
+ return this.renderStepConfirm();
+ case STEP_SIGNER:
+ return this.renderStepWait('Waiting for transaction confirmation in the Parity secure signer');
+ case STEP_TXRECEIPT:
+ return this.renderStepWait('Waiting for the transaction receipt from the network');
+ case STEP_DONE:
+ return this.renderStepCompleted();
+ default:
+ return null;
+ }
+ }
+
+ renderStepCompleted () {
+ return (
+
+
+ Your application has been registered in the registry.
+
+
+ );
+ }
+
+ renderStepConfirm () {
+ return (
+
+
+ You are about to register a new distributed application on the network, the details of this application is given below. This will require a non-refundable fee of { api.util.fromWei(this.dappsStore.fee).toFormat(3) }ETH.
+
+ );
+ }
+
+ onClickClose = () => {
+ this.modalStore.hideRegister();
+ }
+
+ onClickConfirmYes = () => {
+ this.modalStore.doRegister();
+ }
+}
diff --git a/js/src/dapps/dappreg/ModalUpdate/index.js b/js/src/dapps/dappreg/ModalUpdate/index.js
new file mode 100644
index 000000000..8533843ff
--- /dev/null
+++ b/js/src/dapps/dappreg/ModalUpdate/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 './modalUpdate';
diff --git a/js/src/dapps/dappreg/ModalUpdate/modalUpdate.js b/js/src/dapps/dappreg/ModalUpdate/modalUpdate.js
new file mode 100644
index 000000000..591fb59fd
--- /dev/null
+++ b/js/src/dapps/dappreg/ModalUpdate/modalUpdate.js
@@ -0,0 +1,169 @@
+// 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 { observer } from 'mobx-react';
+
+import DappsStore from '../dappsStore';
+import ModalStore from '../modalStore';
+
+import Button from '../Button';
+import Modal from '../Modal';
+
+import styles from '../Modal/modal.css';
+
+const HEADERS = [
+ 'Error During Update',
+ 'Confirm Application Update',
+ 'Waiting for Signer Confirmation',
+ 'Waiting for Transaction Receipt',
+ 'Update Completed'
+];
+const STEP_ERROR = 0;
+const STEP_CONFIRM = 1;
+const STEP_SIGNER = 2;
+const STEP_TXRECEIPT = 3;
+const STEP_DONE = 4;
+
+@observer
+export default class ModalUpdate extends Component {
+ dappsStore = DappsStore.instance();
+ modalStore = ModalStore.instance();
+
+ render () {
+ if (!this.modalStore.showingUpdate) {
+ return null;
+ }
+
+ return (
+
+ { this.renderStep() }
+
+ );
+ }
+
+ renderButtons () {
+ switch (this.modalStore.stepUpdate) {
+ case STEP_ERROR:
+ case STEP_DONE:
+ return [
+
+ ];
+ case STEP_CONFIRM:
+ return [
+ ,
+
+ ];
+ default:
+ return null;
+ }
+ }
+
+ renderStep () {
+ switch (this.modalStore.stepUpdate) {
+ case STEP_CONFIRM:
+ return this.renderStepConfirm();
+ case STEP_SIGNER:
+ return this.renderStepWait('Waiting for transaction confirmation in the Parity secure signer');
+ case STEP_TXRECEIPT:
+ return this.renderStepWait('Waiting for the transaction receipt from the network');
+ case STEP_DONE:
+ return this.renderStepCompleted();
+ default:
+ return null;
+ }
+ }
+
+ renderStepCompleted () {
+ return (
+
+
+ Your application metadata has been updated in the registry.
+
+
+ );
+ }
+
+ renderStepConfirm () {
+ return (
+
+
+ You are about to update the application details in the registry, the details of these updates are given below. Please note that each update will generate a seperate transaction.
+
+ );
+ }
+
+ onClickClose = () => {
+ this.modalStore.hideUpdate();
+ }
+
+ onClickYes = () => {
+ this.modalStore.doUpdate();
+ }
+}
diff --git a/js/src/dapps/dappreg/SelectAccount/index.js b/js/src/dapps/dappreg/SelectAccount/index.js
new file mode 100644
index 000000000..f8c684ee2
--- /dev/null
+++ b/js/src/dapps/dappreg/SelectAccount/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 './selectAccount';
diff --git a/js/src/dapps/dappreg/SelectAccount/selectAccount.js b/js/src/dapps/dappreg/SelectAccount/selectAccount.js
new file mode 100644
index 000000000..0269a4370
--- /dev/null
+++ b/js/src/dapps/dappreg/SelectAccount/selectAccount.js
@@ -0,0 +1,49 @@
+// 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 { observer } from 'mobx-react';
+
+import DappsStore from '../dappsStore';
+
+@observer
+export default class SelectAccount extends Component {
+ dappsStore = DappsStore.instance();
+
+ render () {
+ return (
+
+ );
+ }
+
+ renderOptions () {
+ return this.dappsStore.accounts.map((account) => {
+ return (
+
+ );
+ });
+ }
+
+ onSelect = (event) => {
+ this.dappsStore.setCurrentAccount(event.target.value);
+ }
+}
diff --git a/js/src/dapps/dappreg/SelectDapp/index.js b/js/src/dapps/dappreg/SelectDapp/index.js
new file mode 100644
index 000000000..0ab133b57
--- /dev/null
+++ b/js/src/dapps/dappreg/SelectDapp/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 './selectDapp';
diff --git a/js/src/dapps/dappreg/SelectDapp/selectDapp.js b/js/src/dapps/dappreg/SelectDapp/selectDapp.js
new file mode 100644
index 000000000..458f5fbe2
--- /dev/null
+++ b/js/src/dapps/dappreg/SelectDapp/selectDapp.js
@@ -0,0 +1,76 @@
+// 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 { observer } from 'mobx-react';
+
+import DappsStore from '../dappsStore';
+
+import Input from '../Input';
+
+@observer
+export default class SelectDapp extends Component {
+ dappsStore = DappsStore.instance();
+
+ render () {
+ if (this.dappsStore.isNew) {
+ return (
+
+
+
+ );
+ }
+
+ let overlayImg = null;
+ if (this.dappsStore.currentApp.imageHash) {
+ overlayImg = (
+
+ );
+ }
+
+ return (
+
+
+
+ );
+ }
+
+ renderOptions () {
+ return this.dappsStore.apps.map((app) => {
+ return (
+
+ );
+ });
+ }
+
+ onSelect = (event) => {
+ this.dappsStore.setCurrentApp(event.target.value);
+ }
+}
diff --git a/js/src/dapps/dappreg/Warning/index.js b/js/src/dapps/dappreg/Warning/index.js
new file mode 100644
index 000000000..6097861be
--- /dev/null
+++ b/js/src/dapps/dappreg/Warning/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 './warning';
diff --git a/js/src/dapps/dappreg/Warning/warning.css b/js/src/dapps/dappreg/Warning/warning.css
new file mode 100644
index 000000000..bc1cd40d9
--- /dev/null
+++ b/js/src/dapps/dappreg/Warning/warning.css
@@ -0,0 +1,36 @@
+/* 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 .
+*/
+
+.warning {
+ background: #f44;
+ border-top-right-radius: 0.25em;
+ bottom: 0;
+ color: #fff;
+ cursor: pointer;
+ font-size: 0.75em;
+ left: 0;
+ line-height: 1.5em;
+ opacity: 1;
+ padding: 1.5em;
+ position: fixed;
+ max-width: 540px;
+ z-index: 100;
+
+ div+div {
+ margin-top: 1.5em;
+ }
+}
diff --git a/js/src/dapps/dappreg/Warning/warning.js b/js/src/dapps/dappreg/Warning/warning.js
new file mode 100644
index 000000000..966c5d3e6
--- /dev/null
+++ b/js/src/dapps/dappreg/Warning/warning.js
@@ -0,0 +1,51 @@
+// 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 { observer } from 'mobx-react';
+
+import { api } from '../parity';
+import DappsStore from '../dappsStore';
+import ModalStore from '../modalStore';
+
+import styles from './warning.css';
+
+@observer
+export default class Warning extends Component {
+ dappsStore = DappsStore.instance();
+ modalStore = ModalStore.instance();
+
+ render () {
+ if (!this.modalStore.showingWarning) {
+ return null;
+ }
+
+ return (
+
+
+ WARNING: Registering a dapp is for developers only. Please ensure you understand the steps needed to develop and deploy applications, should you wish to use this dapp for anything apart from queries.
+
+
+ A non-refundable fee of { api.util.fromWei(this.dappsStore.fee).toFormat(3) }ETH is required for any registration.
+