Initial commit of UI

This commit is contained in:
Richard Ramos 2018-03-28 08:36:08 -04:00
parent 69dd4fd55d
commit fa33b59d94
7 changed files with 99 additions and 5 deletions

0
app/dapp.css Normal file
View File

26
app/dapp.js Normal file
View File

@ -0,0 +1,26 @@
import 'bootstrap';
import 'bootstrap/dist/css/bootstrap.min.css';
import EmbarkJS from 'Embark/EmbarkJS';
import IdentityFactory from 'Embark/contracts/IdentityFactory';
import './dapp.css';
$(function(){
$("#btnCreateIdentity").on('click', async function() {
console.log(IdentityFactory.options.address);
console.log("Test3");
web3.eth.getAccounts()
.then(accounts => console.log(accounts))
//.then(accounts => IdentityFactory.methods.createIdentity().send({from: accounts[0], gasLimit: 5000000}))
// .then((tx) => console.log(tx.events));
// test
// addToLog("#blockchain", "SimpleStorage.methods.set(value).send({from: web3.eth.defaultAccount})");
});
});

61
app/index.html Normal file
View File

@ -0,0 +1,61 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Embark - SimpleStorage Demo</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js"></script>
<script src="js/dapp.js"></script>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body class="container-fluid">
<h3>Identity <small>contracts</small></h3>
<ul class="nav nav-tabs" role="tablist" id="myTabs">
<li role="presentation" class="active"><a href="#factory" role="tab" data-toggle="tab">Factory</a></li>
<li role="presentation"><a href="#identity" role="tab" data-toggle="tab">Identity</a></li>
<li role="presentation"><a href="#recovery" role="tab" data-toggle="tab">Recovery</a></li>
</ul>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="factory">
<h3>1. Create an Identity</h3>
<div class="form-group form-inline">
<button class="get btn btn-primary" id="btnCreateIdentity">Create an Identity</button>
<div>
Identity Address: <span class="identityAddress"></span>
</div>
</div>
<h3>2. Set Kernel</h3>
<div class="form-group form-inline">
<button class="get btn btn-primary" disabled>Create an UpdatedIdentityKernel</button>
<div>
UpdatedIdentityKernel Address: <span class="identityAddress"></span>
</div>
</div>
<div class="form-group form-inline">
<button class="get btn btn-primary" disabled>Register a New Kernel</button>
<div>
Identity Addresss: <span class="identityAddress"></span>
</div>
</div>
<h3>3. Contract Calls </h3>
<p>Javascript calls being made: </p>
<div class="logs">
</div>
</div>
<div role="tabpanel" class="tab-pane" id="identity">
<div class="error alert alert-danger" role="alert">TODO</div>
</div>
<div role="tabpanel" class="tab-pane" id="recovery">
<div class="error alert alert-danger" role="alert">TODO</div>
</div>
</div>
</body>
</html>

View File

@ -1,6 +1,6 @@
{
"default": {
"enabled": true,
"enabled": false,
"provider": "whisper",
"available_providers": ["whisper", "orbit"],
"connection": {

View File

@ -2,7 +2,7 @@
"default": {
"versions": {
"web3.js": "1.0.0-beta",
"solc": "0.4.17"
"solc": "0.4.21"
},
"deployment": {
"host": "localhost",
@ -29,7 +29,7 @@
"TestContract": { "deploy": false },
"UpdatedIdentityKernel": { "deploy": false },
"Identity": { "gas": 5000000 },
"IdentityFactory": { "deploy": false },
"IdentityFactory": { "args": ["0x00"] },
"IdentityKernel": { "gas": 5000000 }
}
}

View File

@ -1,5 +1,10 @@
{
"contracts": ["contracts/**"],
"app": {
"js/dapp.js": ["app/dapp.js"],
"index.html": "app/index.html",
"images/": ["app/images/**"]
},
"buildDir": "dist/",
"config": "config/",
"plugins": {

View File

@ -16,8 +16,10 @@
},
"homepage": "https://github.com/status-im/contracts#readme",
"devDependencies": {
"solidity-coverage": "^0.4.4",
"elliptic": "^6.4.0"
"bootstrap": "^3.3.7",
"elliptic": "^6.4.0",
"jquery": "^3.3.1",
"solidity-coverage": "^0.4.4"
},
"dependencies": {
"elliptic-curve": "^0.1.0",