mirror of https://github.com/BTCPrivate/copay.git
386 lines
15 KiB
HTML
386 lines
15 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
<meta name="viewport" content="width=device-width">
|
|
<title>Copay - Multisignature Wallet</title>
|
|
<link rel="stylesheet" href="css/foundation.min.css">
|
|
<link rel="stylesheet" href="css/foundation-icons.css">
|
|
<link rel="stylesheet" href="css/main.css">
|
|
</head>
|
|
<body>
|
|
<div data-ng-init="init()" data-ng-controller="HeaderController">
|
|
<div class="header">
|
|
<div class="header-content">
|
|
<figure class="left">
|
|
<img src="./img/logo-negative.svg" alt="" width="130">
|
|
</figure>
|
|
<div class="text-right" ng-show="$root.wallet">
|
|
<h5>Company Funds</h5>
|
|
<p ng-show="totalBalance">{{totalBalance}} BTC</p>
|
|
<p ng-show="!totalBalance">0 BTC</p>
|
|
</div>
|
|
</div>
|
|
|
|
<nav class="top-bar" data-topbar ng-show="$root.wallet">
|
|
<ul class="title-area">
|
|
<li class="name"></li>
|
|
<li class="toggle-topbar menu-icon">
|
|
<a href="#"> Menu</a>
|
|
</li>
|
|
</ul>
|
|
|
|
<section class="top-bar-section">
|
|
<ul>
|
|
<li data-ng-repeat="item in menu" ui-route="/{{item.link}}" class="large-2 text-center" data-ng-class="{active: isActive(item)}">
|
|
<a href="{{item.link}}"> <i class="{{item.icon}}"></i> {{item.title}}</a>
|
|
</li>
|
|
<li class="large-2 text-center">
|
|
<a href="#" ng-click="signout()"> <i class="fi-power"></i> Signout</a>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
<div ng-if='$root.flashMessage.message' class="panel callout radius" style="color:red" >
|
|
{{$root.flashMessage.type}}:
|
|
{{$root.flashMessage.message}}
|
|
<a href="#" ng-click="clearFlashMessage()" class="button tiny">Dismiss</a>
|
|
</div>
|
|
|
|
|
|
<div ng-if='$root.wallet && !$root.wallet.publicKeyRing.isComplete() && !loading' class="panel callout radius" >
|
|
|
|
<p class="panel panel-sign"> <i class="fi-alert size-40"></i>
|
|
NOTE: Your wallet is not complete yet.
|
|
{{$root.wallet.publicKeyRing.totalCopayers - $root.wallet.publicKeyRing.registeredCopayers() }} keys are missing. Ask your copayers to join your session: <b>{{$root.wallet.network.peerId}}</b>
|
|
|
|
</p>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="large-12 columns" ng-view></div>
|
|
</div>
|
|
|
|
<!-- Templates -->
|
|
<script type="text/ng-template" id="signin.html">
|
|
<div ng-controller="SigninController">
|
|
<div class="panel callout radius" ng-show="loading">
|
|
Connecting to wallet...
|
|
</div>
|
|
<div ng-show="!loading">
|
|
<div class="row">
|
|
<div class="large-6 columns">
|
|
<h3>Join a Network Wallet</h3>
|
|
<input type="text" class="form-control" placeholder="Peer ID" ng-model="connectionId" autofocus>
|
|
</div>
|
|
<div class="large-3 columns">
|
|
<button class="button primary expand round" type="button" ng-click="join(connectionId)">Join</button>
|
|
</div>
|
|
</div>
|
|
<hr>
|
|
<div ng-show="!walletIds.length">
|
|
<div class="row">
|
|
<div class="large-6 columns">
|
|
<h3>Create a New Wallet</h3>
|
|
</div>
|
|
<div class="large-3 columns">
|
|
<button class="button secondary expand round" ng-click="create()">Create</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div ng-show="walletIds.length>0">
|
|
<div class="row">
|
|
<div class="large-6 columns">
|
|
<h3>Open a Existing Wallet</h3>
|
|
<select class="form-control" ng-model="selectedWalletId" ng-options="walletId for walletId in walletIds">
|
|
</select>
|
|
</div>
|
|
<div class="large-3 columns">
|
|
<button class="button primary expand round" type="button" ng-click="open(selectedWalletId)">Open</button>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="text-center">
|
|
<a ng-click="create()">Or create a new wallet</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<hr>
|
|
|
|
</div>
|
|
</div>
|
|
</script>
|
|
|
|
<script type="text/ng-template" id="setup.html">
|
|
<div ng-controller="SetupController">
|
|
<div class="panel callout radius" ng-show="loading">
|
|
Connecting to wallet...
|
|
</div>
|
|
<div ng-show="!loading">
|
|
<h2>Create new multisig wallet</h2>
|
|
<div class="row">
|
|
<div class="large-6 columns">
|
|
<h3>Select total number of copayers</h3>
|
|
<select ng-model="totalCopayers"
|
|
ng-options="totalCopayers as totalCopayers for totalCopayers in TCValues">
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<hr>
|
|
<div class="row">
|
|
<div class="large-6 columns">
|
|
<h3>Select required number of copayers</h3>
|
|
<select ng-model="requiredCopayers"
|
|
ng-options="requiredCopayers as requiredCopayers for requiredCopayers in RCValues">
|
|
</select>
|
|
</div>
|
|
<div class="large-3 columns">
|
|
<button class="button primary expand round" type="button"
|
|
ng-click="create(totalCopayers, requiredCopayers)">
|
|
Create {{requiredCopayers}}-of-{{totalCopayers}} wallet
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="text-center">
|
|
<a href="#signin">Go back</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</script>
|
|
|
|
<script type="text/ng-template" id="peer.html">
|
|
<div class="row" ng-controller="PeerController" ng-init="init()">
|
|
<div class="large-6 columns p70r line-dashed-v">
|
|
<h3>I am </h3>
|
|
<div class="row">
|
|
<div class="large-10 columns p0r">
|
|
<p class="panel share-wallet">{{$root.wallet.network.peerId}}</p>
|
|
</div>
|
|
<div class="large-2 columns">
|
|
<p class="panel panel-sign"> <i class="fi-page-copy size-22"></i> </p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="large-6 columns p70l">
|
|
<h3 class="panel-title">Online Copayers: {{$root.wallet.network.connectedPeers.length}}</h3>
|
|
|
|
<p class="panel panel-sign" ng-show="$root.wallet.publicKeyRing.requiredCopayers > $root.wallet.network.connectedPeers.length"> <i class="fi-alert size-28"></i>
|
|
{{$root.wallet.publicKeyRing.requiredCopayers}} copayers needed for signning transactions
|
|
|
|
|
|
<ul class="no-bullet">
|
|
<li class="panel" ng-repeat="copayer in $root.wallet.network.connectedPeers">
|
|
<span ng-if="copayer == $root.wallet.network.peerId"> You ({{copayer}})<i class="fi-check size-24"></i></span>
|
|
<span ng-if="copayer !== $root.wallet.network.peerId">{{copayer}}</span>
|
|
<span>
|
|
<i class="fi-check size-16 panel-sign right p5h br100"></i>
|
|
</span>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</script>
|
|
|
|
|
|
|
|
<!-- HOME -->
|
|
<script type="text/ng-template" id="home.html">
|
|
<div class="home" data-ng-controller="HomeController">
|
|
<h3>Address</h3>
|
|
|
|
<div class="row">
|
|
<div class="large-6 columns">
|
|
<a class="panel db" ng-repeat="addr in addrs" ng-click="selectAddr(addr)">{{addr}} <span class="right">({{addrBalance[addr]}} BTC) ></span></a>
|
|
</div>
|
|
<div class="large-3 columns line-dashed-v text-center">
|
|
<qrcode size="160" data="{{selectedAddr}}"></qrcode>
|
|
<p class="m10t" ng-repeat="addr in addrs" ng-if="selectedAddr==addr"> <strong> {{addrBalance[addr]}} BTC </strong> </p>
|
|
</div>
|
|
<div class="large-1 columns"> </div>
|
|
<div class="large-2 columns">
|
|
<p> Create a New <strong> Address </strong> </p>
|
|
<button class="secondary round expand" ng-click="newAddr()"> Create </button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</script>
|
|
|
|
|
|
<!-- TRANSACTIONS -->
|
|
<script type="text/ng-template" id="transactions.html">
|
|
<div class="transactions" data-ng-controller="TransactionsController">
|
|
|
|
<div class="row">
|
|
<div class="large-12 columns">
|
|
<h3>Pending Transactions <small>({{txsoutput.length}})</small></h3>
|
|
<div class="panel pending" ng-repeat="txp in txsoutput">
|
|
{{txp}}
|
|
<div class="row">
|
|
<p class="large-5 columns"> Address 1</p>
|
|
<i class="large-2 columns fi-arrow-right size-16 text-center"></i>
|
|
<p class="large-5 columns"> Address 2</p>
|
|
|
|
<div class="large-12 columns m0" ng-show="txp.signedByUs"> YOU SIGNED! </div>
|
|
|
|
<div class="large-12 columns m0" ng-show="!txp.signedByUs">
|
|
<div class="line"></div>
|
|
<button class="primary round large-4 columns"><i class="large-2 columns fi-x size-16 text-center"></i> Ignore</button>
|
|
<small class="large-4 columns text-center">Faltan 3 cosigners</small>
|
|
<button class="secondary round large-4 columns" ng-click="sign(txp.ntxid)"><i class="large-2 columns fi-check size-16 text-center"></i> Sign</button>
|
|
</div>
|
|
</div> <!-- end of row -->
|
|
</div> <!-- end of pending -->
|
|
<div class="line-dashed-h"></div>
|
|
</div>
|
|
|
|
<div class="large-12 columns">
|
|
<h3>Last Transactions</h3>
|
|
<div class="panel">
|
|
<div class="row">
|
|
<p class="large-5 columns"> Address 1 <small class="right"> 1231 BTC </small></p>
|
|
<i class="large-1 columns fi-arrow-left size-16 text-center"></i>
|
|
<p class="large-5 columns"> Adress 2 <small class="right"> 1231 BTC </small></p>
|
|
<span class="panel-res panel-sign">
|
|
<i class="fi-check size-16"></i>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div class="panel">
|
|
<div class="row">
|
|
<p class="large-5 columns"> Address 1 <small class="right"> 1231 BTC </small></p>
|
|
<i class="large-1 columns fi-arrow-left size-16 text-center"></i>
|
|
<p class="large-5 columns"> Adress 2 <small class="right"> 1231 BTC </small></p>
|
|
<span class="panel-res panel-sign">
|
|
<i class="fi-check size-16"></i>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div class="panel">
|
|
<div class="row">
|
|
<p class="large-5 columns"> Address 1 <small class="right"> 1231 BTC </small></p>
|
|
<i class="large-1 columns fi-arrow-left size-16 text-center"></i>
|
|
<p class="large-5 columns"> Adress 2 <small class="right"> 1231 BTC </small></p>
|
|
<span class="panel-res panel-ignore">
|
|
<i class="fi-x size-16"></i>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</script>
|
|
|
|
<!-- SEND -->
|
|
<script type="text/ng-template" id="send.html">
|
|
<div class="send" data-ng-controller="SendController">
|
|
<h3>{{title}}</h3>
|
|
<div class="row">
|
|
<div class="large-8 columns">
|
|
<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 class="button primary round" type="button" ng-click="sendTest()">sendTest</button>
|
|
<button type="submit" class="button secondary round right">send</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</script>
|
|
|
|
<!-- BACKUP -->
|
|
<script type="text/ng-template" id="backup.html">
|
|
<div class="backup" data-ng-controller="BackupController">
|
|
<h2>{{title}}</h2>
|
|
<div class="row text-center">
|
|
<div class="large-4 columns">
|
|
<a href="/" class="panel box-backup">
|
|
<i class="fi-download size-72"></i>
|
|
<p> Download File </p>
|
|
</a>
|
|
</div>
|
|
<div class="large-4 columns">
|
|
<a href="/" class="panel box-backup">
|
|
<i class="fi-social-dropbox size-72"></i>
|
|
<p> Backup to Dropbox </p>
|
|
</a>
|
|
</div>
|
|
<div class="large-4 columns">
|
|
<a href="/" class="panel box-backup">
|
|
<i class="fi-mail size-72"></i>
|
|
<p> Backup to email </p>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</script>
|
|
<div ng-show="$root.wallet" style="margin-top:200px">
|
|
<hr>
|
|
<p>
|
|
[DEBUG] WalletId: {{$root.wallet.id}}
|
|
<ul class="no-bullet">
|
|
<li class="panel" style="word-wrap: break-word;" ng-repeat="pub in $root.wallet.publicKeyRing.copayersBIP32">
|
|
${{pub.extendedPublicKeyString()}}
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
<!-- / <div class="large-4 columns box-backup">Backup to Dropbox</div>
|
|
// <div class="large-4 columns box-backup">Backup to email</div> -->
|
|
<!-- NOT FOUND -->
|
|
<script type="text/ng-template" id="404.html">
|
|
<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-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="lib/bitcore.js"></script>
|
|
<script src="lib/crypto-js/rollups/aes.js"></script>
|
|
<script src="lib/socket.io.js"></script>
|
|
<script src="js/copayBundle.js"></script>
|
|
|
|
<script src="js/app.js"></script>
|
|
<script src="js/config.js"></script>
|
|
<script src="js/routes.js"></script>
|
|
<script src="js/directives.js"></script>
|
|
<script src="js/filters.js"></script>
|
|
<script src="js/services/socket.js"></script>
|
|
<script src="js/services/walletFactory.js"></script>
|
|
<script src="js/services/controllerUtils.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/setup.js"></script>
|
|
<script src="js/controllers/peer.js"></script>
|
|
|
|
<script src="js/init.js"></script>
|
|
</body>
|
|
</html>
|