mirror of https://github.com/BTCPrivate/copay.git
482 lines
20 KiB
HTML
482 lines
20 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">
|
|
<a href="#"><img src="./img/logo-negative.svg" alt="Copay" width="130" /></a>
|
|
</figure>
|
|
<div class="text-right" ng-show="$root.wallet">
|
|
<h5 ng-show="$root.wallet.id">Wallet ID: {{$root.wallet.id}}</h5>
|
|
<p>
|
|
Balance: {{totalBalance || 0}} <i class="fi-bitcoin"></i><br>
|
|
Available to Spend:{{availableBalance || 0}} <i class="fi-bitcoin"></i>
|
|
</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 ng-click="isCollapsed=!isCollapsed"> Menu</a>
|
|
</li>
|
|
</ul>
|
|
|
|
<section class="top-bar-section {{isCollapsed && 'hide_menu' || 'show_menu'}}">
|
|
<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 class="row" ng-if='$root.flashMessage.message'>
|
|
<div class="small-8 large-centered columns">
|
|
<div data-alert class="alert-box round {{$root.flashMessage.type}}">
|
|
{{$root.flashMessage.message}}
|
|
<a ng-click="clearFlashMessage()" class="close">×</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div ng-if='$root.wallet && !$root.wallet.publicKeyRing.isComplete() && !loading' data-alert class="alert-box info round" >
|
|
<i class="fi-alert size-18"></i>
|
|
Note: Your wallet is not complete yet.
|
|
<span ng-show="$root.wallet.publicKeyRing.totalCopayers - $root.wallet.publicKeyRing.registeredCopayers()>1">
|
|
{{$root.wallet.publicKeyRing.totalCopayers - $root.wallet.publicKeyRing.registeredCopayers() }} keys are
|
|
</span>
|
|
<span ng-show="$root.wallet.publicKeyRing.totalCopayers - $root.wallet.publicKeyRing.registeredCopayers()==1">
|
|
One key is
|
|
</span>
|
|
missing. Share this secret with your other copayers for them to join your wallet: <b>{{$root.wallet.getMyPeerId()}}</b>
|
|
</div>
|
|
</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 data-alert class="alert-box info round" ng-show="loading">
|
|
Connecting to wallet...
|
|
</div>
|
|
<div ng-show="!loading">
|
|
<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>
|
|
<hr>
|
|
</div>
|
|
<div ng-show="walletIds.length">
|
|
<div class="row">
|
|
<div class="large-6 columns">
|
|
<h3>Open 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 secondary expand round" type="button"
|
|
ng-click="open(selectedWalletId)">Open</button>
|
|
</div>
|
|
</div>
|
|
<hr>
|
|
</div>
|
|
<div ng-show="true">
|
|
<div class="row">
|
|
<div class="large-6 columns">
|
|
<h3>Join a Wallet in Creation</h3>
|
|
<input type="text" class="form-control" placeholder="Paste wallet secret here"
|
|
ng-model="connectionId" required ng-minlength="32" ng-maxlength="32" autofocus>
|
|
</div>
|
|
<div class="large-3 columns">
|
|
<button class="button primary expand round"
|
|
ng-click="join(connectionId)">Join</button>
|
|
</div>
|
|
</div>
|
|
<hr>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="large-12 columns">
|
|
<div ng-show="walletIds.length">
|
|
<a ng-click="create()">Create a new wallet</a>
|
|
</div>
|
|
<a class="right" ng-click="import()">Import from file</a>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</script>
|
|
|
|
<script type="text/ng-template" id="setup.html">
|
|
<div ng-controller="SetupController">
|
|
<div data-alert class="alert-box info round" ng-show="loading">
|
|
Connecting to wallet...
|
|
</div>
|
|
<div ng-show="!loading">
|
|
<div class="row">
|
|
<div class="large-6 large-centered columns">
|
|
<h3>Create new multisig wallet</h3>
|
|
<hr>
|
|
<h6>Select total number of copayers</h6>
|
|
<select ng-model="totalCopayers"
|
|
ng-options="totalCopayers as totalCopayers for totalCopayers in TCValues">
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="large-6 large-centered columns m30v">
|
|
<h6>Select required number of signatures</h6>
|
|
<select ng-model="requiredCopayers"
|
|
ng-options="requiredCopayers as requiredCopayers for requiredCopayers in RCValues">
|
|
</select>
|
|
</div>
|
|
<div class="large-6 large-centered columns">
|
|
<hr>
|
|
<button class="button primary round right" type="button"
|
|
ng-click="create(totalCopayers, requiredCopayers)">
|
|
Create {{requiredCopayers}}-of-{{totalCopayers}} wallet
|
|
</button>
|
|
<div class="left">
|
|
<a href="#signin">Go back</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</script>
|
|
|
|
<script type="text/ng-template" id="peer.html">
|
|
<div class="row" ng-controller="PeerController">
|
|
<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="text-info" 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 signing 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}})</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>
|
|
|
|
|
|
|
|
<!-- ADDRESS -->
|
|
<script type="text/ng-template" id="addresses.html">
|
|
<div class="addresses" data-ng-controller="AddressesController">
|
|
<div ng-show='$root.wallet.publicKeyRing.isComplete()'>
|
|
<h3>Addresses (available to spend)</h3>
|
|
<div class="row">
|
|
<div class="large-6 columns">
|
|
<a class="panel db" ng-repeat="addr in addrs" ng-click="selectAddr(addr)">{{addr}}
|
|
|
|
<span ng-if="!isMain[addr]">(change)</span>
|
|
<span class="right">({{balanceByAddr[addr] || 0}} <i class="fi-bitcoin"></i>)</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> {{balanceByAddr[addr]}} <i class="fi-bitcoin"></i> </strong> </p>
|
|
</div>
|
|
<div class="large-3 columns text-center">
|
|
<p> Create a New <strong> Address </strong> </p>
|
|
<button class="secondary round expand" ng-click="newAddr()"> Create </button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</script>
|
|
|
|
|
|
<!-- TRANSACTIONS -->
|
|
<script type="text/ng-template" id="transactions.html">
|
|
<div class="transactions" data-ng-controller="TransactionsController">
|
|
<div class="row" ng-show='$root.wallet.publicKeyRing.isComplete()'>
|
|
<div class="large-12 columns">
|
|
<h4>Pending transactions <small>({{txs.length}})</small></h4>
|
|
<div class="panel pending" ng-repeat="tx in txs | orderBy: 'createdTs':true">
|
|
<div class="txheader">
|
|
<div class="row">
|
|
<div class="large-8 columns">
|
|
Proposal ID: {{tx.ntxid}}
|
|
</div>
|
|
<div class="large-4 columns text-right">
|
|
created at {{tx.createdTs | date:'medium'}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="large-12 columns">
|
|
<table style="width:100%">
|
|
<tbody>
|
|
<tr ng-repeat="o in tx.outs">
|
|
<td class="text-right size-24">{{o.value}} <i class="fi-bitcoin"></i></td>
|
|
<td class="text-center size-48"> <i class="fi-arrow-right size-40">
|
|
<td class="text-left size-24">{{o.address}}</td>
|
|
</tr>
|
|
<tr ng-repeat="(peer, actions) in tx.peerActions">
|
|
<td colspan="3" >
|
|
<span ng-if="peer == $root.wallet.network.peerId"> You</span>
|
|
<span ng-if="peer != $root.wallet.network.peerId"> {{peer}}</span>
|
|
:
|
|
<span ng-repeat="(action, ts) in actions">
|
|
<a title="{{ts | date:'medium'}}"> {{action}}</a>
|
|
</span>
|
|
</tr>
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="txbottom">
|
|
<div class="row">
|
|
<div class="large-6 columns" ng-show="!tx.sentTs">
|
|
<div ng-show="tx.signedByUs">
|
|
<i class="fi-check size-40"></i> Signed by you already
|
|
</div>
|
|
<div ng-show="!tx.signedByUs && tx.missingSignatures">
|
|
<button class="secondary round" ng-click="sign(tx.ntxid)">
|
|
<i class="fi-check"></i> Sign
|
|
</button>
|
|
<button class="primary round">
|
|
<i class="fi-x"></i> Ignore
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="large-6 columns text-right">
|
|
<span ng-show="!tx.missingSignatures && !tx.sentTs">
|
|
Transaction ready.
|
|
<button class="secondary round" ng-click="send(tx.ntxid)">
|
|
Broadcast Transaction
|
|
</button>
|
|
</span>
|
|
|
|
<span ng-show="!tx.missingSignatures && tx.sentTs">
|
|
<i class="fi-arrow-right size-40"></i>
|
|
Sent at {{tx.sentTs | date:'medium'}}
|
|
TXID: {{tx.sentTxid}}
|
|
</span>
|
|
<span ng-show="tx.missingSignatures==1">
|
|
One signature missing
|
|
</span>
|
|
<span ng-show="tx.missingSignatures>1">
|
|
{{tx.missingSignatures}} signatures missing</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="large-12 columns">
|
|
<!--
|
|
<h4>Last transactions</h4>
|
|
<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"> Address 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"> Address 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"> Address 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">
|
|
<div class="row" ng-show='$root.wallet.publicKeyRing.isComplete()'>
|
|
<div class="small-6 large-centered columns">
|
|
<h3>{{title}}</h3>
|
|
<form name="sendForm" ng-submit="submitForm(sendForm)" novalidate>
|
|
<div class="row">
|
|
<div class="large-12 columns">
|
|
<label for="address">To address
|
|
<small ng-hide="!sendForm.address.$pristine">required</small>
|
|
<small class="is-valid" ng-show="!sendForm.address.$invalid && !sendForm.address.$pristine">is valid!</small>
|
|
<small class="has-error" ng-show="sendForm.address.$invalid && !sendForm.address.$pristine">
|
|
is not valid</small>
|
|
</label>
|
|
<input type="text" id="address" name="address" placeholder="Send to" ng-model="address" ng-minlength="20" ng-maxlength="37" required>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="large-6 columns">
|
|
<div class="row collapse">
|
|
<label for="amount">Amount
|
|
<small ng-hide="!sendForm.amount.$pristine">required</small>
|
|
<small class="is-valid" ng-show="!sendForm.amount.$invalid && !sendForm.amount.$pristine">is valid!</small>
|
|
<small class="has-error" ng-show="sendForm.amount.$invalid && !sendForm.amount.$pristine">
|
|
is not valid</small>
|
|
</label>
|
|
<div class="small-9 columns">
|
|
<input type="number" id="amount" name="amount" placeholder="Amount" ng-model="amount" min="0.0001" max="10000000" required>
|
|
</div>
|
|
<div class="small-3 columns">
|
|
<span class="postfix">BTC</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="large-4 columns">
|
|
<button type="submit" class="button secondary round text-center" ng-disabled="sendForm.$invalid">
|
|
Send
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</script>
|
|
|
|
<!-- BACKUP -->
|
|
<script type="text/ng-template" id="backup.html">
|
|
<div class="backup" data-ng-controller="BackupController">
|
|
<h3>{{title}}</h3>
|
|
<div class="row text-center">
|
|
<div class="large-4 columns">
|
|
<a class="panel box-backup" ng-click="download()">
|
|
<i class="fi-download size-72"></i>
|
|
<p> Download File </p>
|
|
</a>
|
|
</div>
|
|
<div class="large-4 columns">
|
|
<a class="panel box-backup" ng-click="dropbox()">
|
|
<i class="fi-social-dropbox size-72"></i>
|
|
<p> Backup to Dropbox </p>
|
|
</a>
|
|
</div>
|
|
<div class="large-4 columns">
|
|
<a class="panel box-backup" ng-click="email()">
|
|
<i class="fi-mail size-72"></i>
|
|
<p> Backup to email </p>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</script>
|
|
|
|
<!-- / <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="config.js"></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/file-saver/FileSaver.js"></script>
|
|
<script src="lib/socket.io.js"></script>
|
|
<script src="js/copayBundle.js"></script>
|
|
|
|
<script src="js/app.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/addresses.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>
|