mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-02-02 02:15:58 +00:00
update boilerplate and demo
This commit is contained in:
parent
569734a80d
commit
4b8a353720
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,6 +5,7 @@ NOTES
|
||||
demo/dist/
|
||||
demo/.embark/development/
|
||||
demo/config/production/password
|
||||
demo/node_modules/
|
||||
boilerplate/dist/
|
||||
docs/_build
|
||||
docs/utils/__pycache_
|
||||
|
0
boilerplate/app/images/.gitkeep
Normal file
0
boilerplate/app/images/.gitkeep
Normal file
6
boilerplate/app/js/index.js
Normal file
6
boilerplate/app/js/index.js
Normal file
@ -0,0 +1,6 @@
|
||||
import EmbarkJS from 'Embark/EmbarkJS';
|
||||
|
||||
// import your contracts
|
||||
// e.g if you have a contract named SimpleStorage:
|
||||
//import SimpleStorage from 'Embark/contracts/SimpleStorage';
|
||||
|
@ -2,7 +2,8 @@
|
||||
"contracts": ["app/contracts/**"],
|
||||
"app": {
|
||||
"css/app.css": ["app/css/**"],
|
||||
"js/app.js": ["embark.js", "app/js/**"],
|
||||
"js/app.js": ["app/js/index.js"],
|
||||
"images/": ["app/images/**"],
|
||||
"index.html": "app/index.html"
|
||||
},
|
||||
"buildDir": "dist/",
|
||||
|
@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Embark - SimpleStorage Demo</title>
|
||||
<link rel="stylesheet" href="css/app.css">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js"></script>
|
||||
<script src="js/app.js"></script>
|
||||
</head>
|
||||
<body class="container">
|
||||
|
7
demo/app/js/_vendor/bootstrap.min.js
vendored
7
demo/app/js/_vendor/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
5
demo/app/js/_vendor/jquery.min.js
vendored
5
demo/app/js/_vendor/jquery.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,5 +1,11 @@
|
||||
/*globals $, SimpleStorage, document*/
|
||||
|
||||
import $ from 'jquery';
|
||||
import 'bootstrap';
|
||||
import 'bootstrap/dist/css/bootstrap.min.css';
|
||||
import EmbarkJS from 'Embark/EmbarkJS';
|
||||
import SimpleStorage from 'Embark/contracts/SimpleStorage';
|
||||
|
||||
var addToLog = function(id, txt) {
|
||||
$(id + " .logs").append("<br>" + txt);
|
||||
};
|
||||
@ -48,19 +54,19 @@ $(document).ready(function() {
|
||||
//EmbarkJS.Storage.setProvider('ipfs',{server: 'localhost', port: '5001'});
|
||||
|
||||
$("#storage .error").hide();
|
||||
EmbarkJS.Storage.ipfsConnection.ping()
|
||||
.then(function(){
|
||||
//EmbarkJS.Storage.ipfsConnection.version()
|
||||
// .then(function(){
|
||||
$("#status-storage").addClass('status-online');
|
||||
$("#storage-controls").show();
|
||||
})
|
||||
.catch(function(err) {
|
||||
if(err){
|
||||
console.log("IPFS Connection Error => " + err.message);
|
||||
$("#storage .error").show();
|
||||
$("#status-storage").addClass('status-offline');
|
||||
$("#storage-controls").hide();
|
||||
}
|
||||
});
|
||||
// })
|
||||
// .catch(function(err) {
|
||||
// if(err){
|
||||
// console.log("IPFS Connection Error => " + err.message);
|
||||
// $("#storage .error").show();
|
||||
// $("#status-storage").addClass('status-offline');
|
||||
// $("#storage-controls").hide();
|
||||
// }
|
||||
// });
|
||||
|
||||
$("#storage button.setIpfsText").click(function() {
|
||||
var value = $("#storage input.ipfsText").val();
|
||||
|
@ -1,10 +1,11 @@
|
||||
{
|
||||
"contracts": ["app/contracts/**"],
|
||||
"app": {
|
||||
"js/app.js": ["app/js/index.js"],
|
||||
"js/jquery.js": ["app/js/_vendor/jquery.js"],
|
||||
"index.html": "app/index.html",
|
||||
"css/app.css": ["app/css/**"],
|
||||
"images/": ["app/images/**"],
|
||||
"js/app.js": ["embark.js", "app/js/_vendor/jquery.min.js", "app/js/_vendor/bootstrap.min.js", "app/js/**"],
|
||||
"index.html": "app/index.html"
|
||||
"images/": ["app/images/**"]
|
||||
},
|
||||
"buildDir": "dist/",
|
||||
"config": "config/",
|
||||
|
@ -10,5 +10,7 @@
|
||||
"license": "ISC",
|
||||
"homepage": "",
|
||||
"devDependencies": {
|
||||
"bootstrap": "^3.3.6",
|
||||
"jquery": "^1.11.3"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user