Refactoring of the Dapp Registry (#4589)

* Add React Hot Loader to DappReg dapp

* Updated colours

* Add DappCards

* Dapp Modal with manifest displayed

* Add input to the Dapp Modal

* WIP // Editing a Dapp

* Clean-Up

* Linting

* CleanUp and separate dapp from dappS

* Semi-working updates

* Working Editing of a Dapp

* OCD

* Linting

* Add a Dapp -- WIP

* Register a new Dapp

* WIP Dapps

* Working update / delete / register

* Better promises

* Working updates for DappReg

* Fully functional again !

* Generic Card Component

* Dashed Register Card

* Cleanups

* Cleanups

* Add Actions to Modal

* Clean-Up

* Better Close Icon

* Single place for Registry version // Fetch meta-data from Registry

* Fixing test

* Fix saving changes in dapp reg

* PR Grumbles - Part I

* PR Grumble - Part I

* PR Grumble - Part II

* DappReg Contract owner can delete dapps
This commit is contained in:
Nicolas Gotchac
2017-03-10 13:31:57 +01:00
committed by Jaco Greeff
parent e15f60b819
commit eebb8b87a4
49 changed files with 2351 additions and 1383 deletions

View File

@@ -15,11 +15,13 @@
/* along with Parity. If not, see <http://www.gnu.org/licenses/>.
*/
@import '../_colors.css';
.warning {
background: #f44;
background: $warning-bg;
border-top-right-radius: 0.25em;
bottom: 0;
color: #fff;
color: white;
cursor: pointer;
font-size: 0.75em;
left: 0;

View File

@@ -15,37 +15,41 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
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();
dappsStore = DappsStore.get();
state = {
show: true
};
render () {
if (!this.modalStore.showingWarning) {
if (!this.state.show) {
return null;
}
return (
<div className={ styles.warning } onClick={ this.onClose }>
<div>
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.
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.
</div>
<div>
A non-refundable fee of { api.util.fromWei(this.dappsStore.fee).toFormat(3) }<small>ETH</small> is required for any registration.
A non-refundable fee
of { api.util.fromWei(this.dappsStore.fee).toFormat(3) } <small>ETH</small> is required
for any registration.
</div>
</div>
);
}
onClose = () => {
this.modalStore.hideWarning();
this.setState({ show: false });
}
}