fix conflicts
This commit is contained in:
commit
64fc2dd22b
13 changed files with 209 additions and 5827 deletions
|
|
@ -7,8 +7,9 @@
|
|||
],
|
||||
"dependencies": {
|
||||
"angular": "~1.2.x",
|
||||
"angular-bootstrap": "~0.10.0",
|
||||
"angular-foundation": "*",
|
||||
"angular-route": "~1.2.14",
|
||||
"angular-qrcode": "~3.1.0",
|
||||
"peerjs": "~0.3.8",
|
||||
"angular-mocks": "~1.2.14",
|
||||
"mocha": "~1.18.2",
|
||||
|
|
|
|||
5785
css/bootstrap.css
vendored
5785
css/bootstrap.css
vendored
File diff suppressed because it is too large
Load diff
7
css/bootstrap.min.css
vendored
7
css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
1
css/foundation.min.css
vendored
Normal file
1
css/foundation.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1,3 +0,0 @@
|
|||
body {
|
||||
padding-top: 50px;
|
||||
}
|
||||
132
index.html
132
index.html
|
|
@ -5,32 +5,23 @@
|
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>Cosign - Multisignature Wallet</title>
|
||||
<link rel="stylesheet" href="css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="css/foundation.min.css">
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar navbar-inverse navbar-fixed-top" role="banner" ng-controller="HeaderController" ng-init="init()">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="./index.html">Cosign</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" ng-if="$root.isLogged">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><a href="" ng-click="signout()"><i class="glyphicon glyphicon-log-out"></i> Signout</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div ng-view></div>
|
||||
<div class="row">
|
||||
<div class="large-12 columns" data-ng-init="init()" data-ng-controller="HeaderController">
|
||||
<h1>cosign</h1>
|
||||
<dl class="sub-nav">
|
||||
<dd data-ng-repeat="item in menu" ui-route="/{{item.link}}" data-ng-class="{active: isActive(item)}">
|
||||
<a href="{{item.link}}">{{item.title}}</a>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="large-12 columns" ng-view></div>
|
||||
</div>
|
||||
|
||||
<!-- Templates -->
|
||||
<script type="text/ng-template" id="signin.html">
|
||||
|
|
@ -72,19 +63,102 @@
|
|||
</div>
|
||||
</script>
|
||||
|
||||
<!-- HOME -->
|
||||
<script type="text/ng-template" id="home.html">
|
||||
<h1>home</h1>
|
||||
<div class="home" data-ng-controller="HomeController">
|
||||
<h2>{{title}}</h2>
|
||||
|
||||
<accordion close-others="oneAtATime">
|
||||
<accordion-group ng-repeat="addr in addrs">
|
||||
<accordion-heading>
|
||||
{{addr.addrStr}}
|
||||
</accordion-heading>
|
||||
<qrcode size="160" data="{{addr.addrStr}}"></qrcode>
|
||||
</accordion-group>
|
||||
</accordion>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<!-- TRANSACTIONS -->
|
||||
<script type="text/ng-template" id="transactions.html">
|
||||
<div class="transactions" data-ng-controller="TransactionsController">
|
||||
<h2>{{title}}</h2>
|
||||
<div class="row">
|
||||
<div class="large-6 columns">
|
||||
<h3>Input</h3>
|
||||
<accordion close-others="oneAtATime">
|
||||
<accordion-group ng-repeat="tx in txsinput">
|
||||
<accordion-heading>
|
||||
{{tx.fromAddr}} -> {{tx.toAddr}} : {{tx.amount}}
|
||||
</accordion-heading>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-md-4">ignore</div>
|
||||
<div class="col-xs-6 col-md-4">(Required 3 cosign)</div>
|
||||
<div class="col-xs-6 col-md-4">sign</div>
|
||||
</div>
|
||||
</accordion-group>
|
||||
</accordion>
|
||||
</div>
|
||||
<div class="large-6 columns">
|
||||
<h3>Output</h3>
|
||||
<accordion close-others="oneAtATime">
|
||||
<accordion-group ng-repeat="tx in txsoutput">
|
||||
<accordion-heading>
|
||||
{{tx.fromAddr}} <- {{tx.toAddr}} : {{tx.amount}}
|
||||
</accordion-heading>
|
||||
Details...
|
||||
</accordion-group>
|
||||
</accordion>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<!-- SEND -->
|
||||
<script type="text/ng-template" id="send.html">
|
||||
<div class="send" data-ng-controller="SendController">
|
||||
<h2>{{title}}</h2>
|
||||
<form>
|
||||
<label for="address">To
|
||||
<input type="text" id="address" placeholder="Send to">
|
||||
</label>
|
||||
<label for="amount">Amount
|
||||
<input type="text" id="amount" placeholder="Amount">
|
||||
<select class="form-control">
|
||||
<option>mBTC</option>
|
||||
<option>BTC</option>
|
||||
</select>
|
||||
</label>
|
||||
<button type="submit" class="btn btn-default">send</button>
|
||||
</form>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<!-- BACKUP -->
|
||||
<script type="text/ng-template" id="backup.html">
|
||||
<div class="backup" data-ng-controller="BackupController">
|
||||
<h2>{{title}}</h2>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-md-4">Download file</div>
|
||||
<div class="col-xs-6 col-md-4">Backup to Dropbox</div>
|
||||
<div class="col-xs-6 col-md-4">Backup to email</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<!-- NOT FOUND -->
|
||||
<script type="text/ng-template" id="404.html">
|
||||
<h1>404</h1>
|
||||
<h2 class="text-center">404</h2>
|
||||
<h3 class="text-center">Page not found</h3>
|
||||
<p class="text-center"><a href="#/">go back...</a></p>
|
||||
</script>
|
||||
|
||||
<script src="lib/angular/angular.min.js"></script>
|
||||
<script src="lib/qrcode-generator/js/qrcode.js"></script>
|
||||
<script src="lib/angular-qrcode/qrcode.js"></script>
|
||||
<script src="lib/angular-route/angular-route.min.js"></script>
|
||||
<script src="lib/angular-bootstrap/ui-bootstrap.min.js"></script>
|
||||
<script src="lib/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
|
||||
<script src="lib/peerjs/peer.min.js"></script>
|
||||
<script src="lib/angular-foundation/mm-foundation.min.js"></script>
|
||||
<script src="lib/angular-foundation/mm-foundation-tpls.min.js"></script>
|
||||
<script src="lib/peerjs/peer.js"></script>
|
||||
|
||||
<script src="js/app.js"></script>
|
||||
<script src="js/config.js"></script>
|
||||
|
|
@ -94,6 +168,10 @@
|
|||
<script src="js/services/network.js"></script>
|
||||
|
||||
<script src="js/controllers/header.js"></script>
|
||||
<script src="js/controllers/home.js"></script>
|
||||
<script src="js/controllers/transactions.js"></script>
|
||||
<script src="js/controllers/send.js"></script>
|
||||
<script src="js/controllers/backup.js"></script>
|
||||
<script src="js/controllers/signin.js"></script>
|
||||
<script src="js/controllers/join.js"></script>
|
||||
|
||||
|
|
|
|||
17
js/app.js
17
js/app.js
|
|
@ -2,15 +2,24 @@
|
|||
|
||||
angular.module('cosign',[
|
||||
'ngRoute',
|
||||
'ui.bootstrap',
|
||||
'mm.foundation',
|
||||
'monospaced.qrcode',
|
||||
'cosign.header',
|
||||
'cosign.home',
|
||||
'cosign.transactions',
|
||||
'cosign.send',
|
||||
'cosign.backup',
|
||||
'cosign.network',
|
||||
'cosign.signin',
|
||||
'cosign.join',
|
||||
'cosign.network'
|
||||
'cosign.join'
|
||||
]);
|
||||
|
||||
angular.module('cosign.header', []);
|
||||
angular.module('cosign.home', []);
|
||||
angular.module('cosign.transactions', []);
|
||||
angular.module('cosign.send', []);
|
||||
angular.module('cosign.backup', []);
|
||||
angular.module('cosign.network', []);
|
||||
angular.module('cosign.signin', []);
|
||||
angular.module('cosign.join', []);
|
||||
angular.module('cosign.network', []);
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,15 @@ angular
|
|||
.when('/join/:id', {
|
||||
templateUrl: 'join.html'
|
||||
})
|
||||
.when('/transactions', {
|
||||
templateUrl: 'transactions.html'
|
||||
})
|
||||
.when('/send', {
|
||||
templateUrl: 'send.html'
|
||||
})
|
||||
.when('/backup', {
|
||||
templateUrl: 'backup.html'
|
||||
})
|
||||
.otherwise({
|
||||
templateUrl: '404.html'
|
||||
});
|
||||
|
|
|
|||
6
js/controllers/backup.js
Normal file
6
js/controllers/backup.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('cosign.backup').controller('BackupController',
|
||||
function($scope, $rootScope, $location) {
|
||||
$scope.title = 'Backup';
|
||||
});
|
||||
|
|
@ -2,7 +2,27 @@
|
|||
|
||||
angular.module('cosign.header').controller('HeaderController',
|
||||
function($scope, $rootScope, $location) {
|
||||
$scope.menu = [{
|
||||
'title': 'Home',
|
||||
'link': '#/'
|
||||
}, {
|
||||
'title': 'Transactions',
|
||||
'link': '#/transactions'
|
||||
}, {
|
||||
'title': 'Send',
|
||||
'link': '#/send'
|
||||
}, {
|
||||
'title': 'Backup',
|
||||
'link': '#/backup'
|
||||
}];
|
||||
|
||||
$scope.isActive = function(item) {
|
||||
if (item.link.replace('#','') == $location.path()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
$scope.init = function() {
|
||||
$rootScope.isLogged = false;
|
||||
};
|
||||
|
|
|
|||
13
js/controllers/home.js
Normal file
13
js/controllers/home.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('cosign.home').controller('HomeController',
|
||||
function($scope, $rootScope, $location) {
|
||||
$scope.title = 'Home';
|
||||
|
||||
$scope.oneAtATime = true;
|
||||
|
||||
$scope.addrs = [
|
||||
{ addrStr: 'n3zUqNR7Bbbc4zJhPVj1vG2Lx66K3Xhzvb'},
|
||||
{ addrStr: 'my9wnLwwUrwpNfEgSrWY62ymEGf1edKf4J'}
|
||||
];
|
||||
});
|
||||
6
js/controllers/send.js
Normal file
6
js/controllers/send.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('cosign.send').controller('SendController',
|
||||
function($scope, $rootScope, $location) {
|
||||
$scope.title = 'Send';
|
||||
});
|
||||
34
js/controllers/transactions.js
Normal file
34
js/controllers/transactions.js
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('cosign.transactions').controller('TransactionsController',
|
||||
function($scope, $rootScope, $location) {
|
||||
$scope.title = 'Transactions';
|
||||
|
||||
$scope.oneAtATime = true;
|
||||
|
||||
$scope.txsinput = [
|
||||
{
|
||||
fromAddr: "n3zUqNR7Bbbc4zJhPVj1vG2Lx66K3Xhzvb",
|
||||
toAddr: "msvv2mDfE298s7boXwALq4Dqv77K3TWRZ1",
|
||||
amount: 23.9982
|
||||
},
|
||||
{
|
||||
fromAddr: "my9wnLwwUrwpNfEgSrWY62ymEGf1edKf4J",
|
||||
toAddr: "monCusNiDuptf68rtr58hEjKpJt6cW6zwS",
|
||||
amount: 2.22
|
||||
}
|
||||
];
|
||||
|
||||
$scope.txsoutput = [
|
||||
{
|
||||
fromAddr: "n3zUqNR7Bbbc4zJhPVj1vG2Lx66K3Xhzvb",
|
||||
toAddr: "msvv2mDfE298s7boXwALq4Dqv77K3TWRZ1",
|
||||
amount: 23.9982
|
||||
},
|
||||
{
|
||||
fromAddr: "my9wnLwwUrwpNfEgSrWY62ymEGf1edKf4J",
|
||||
toAddr: "monCusNiDuptf68rtr58hEjKpJt6cW6zwS",
|
||||
amount: 2.22
|
||||
}
|
||||
];
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue