mirror of https://github.com/BTCPrivate/copay.git
fix style issues
This commit is contained in:
parent
d98bc6f2e9
commit
aa021125a0
15
css/main.css
15
css/main.css
|
@ -278,8 +278,17 @@ button.secondary:hover { background-color: #FFDF00 !important;}
|
|||
}
|
||||
|
||||
.video-small {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border: 1px solid black;
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
margin: 20px;
|
||||
display: inline;
|
||||
float:left;
|
||||
}
|
||||
.online {
|
||||
border: 10px solid green;
|
||||
}
|
||||
.offline {
|
||||
border: 10px solid gray;
|
||||
}
|
||||
|
||||
|
||||
|
|
29
index.html
29
index.html
|
@ -205,20 +205,29 @@
|
|||
<script type="text/ng-template" id="peer.html">
|
||||
<div class="row">
|
||||
<div class="large-12 columns p70l">
|
||||
<h3 class="panel-title">Online Copayers: {{$root.wallet.network.connectedCopayers().length}}</h3>
|
||||
|
||||
<p class="text-info" ng-show="$root.wallet.publicKeyRing.requiredCopayers >$root.wallet.network.connectedCopayers()"> <i class="fi-alert size-28"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="large-12 columns p70l">
|
||||
{{$root.wallet.publicKeyRing.requiredCopayers}} copayers needed for signing transactions
|
||||
|
||||
<ul class="no-bullet">
|
||||
<li class="panel" ng-repeat="copayer in $root.wallet.network.connectedPeers">
|
||||
<video class="video-small" autoplay ng-show="$root.videoSrc[copayer]"
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="large-4 columns"
|
||||
ng-repeat="copayer in $root.wallet.getRegisteredPeerIds()">
|
||||
<video
|
||||
ng-class="($root.wallet.getOnlinePeerIDs().indexOf(copayer) != -1) ? 'online' : 'offline'"
|
||||
class="video-small"
|
||||
autoplay ng-show="$root.videoSrc[copayer]"
|
||||
ng-src="{{$root.getVideoURL(copayer)}}"
|
||||
id="{{copayer + '-video'}}" muted="true"></video>
|
||||
id="{{copayer + '-video'}}" muted="true"
|
||||
title="{{copayer + (copayer == $root.wallet.network.peerId?' (You)':'')}}" ></video>
|
||||
<img ng-show="!$root.videoSrc[copayer]"
|
||||
src="/img/satoshi.gif" title="{{copayer + (copayer == $root.wallet.network.peerId?' (You)':'')}}" />
|
||||
</li>
|
||||
</ul>
|
||||
ng-class="($root.wallet.getOnlinePeerIDs().indexOf(copayer) != -1) ? 'online' : 'offline'"
|
||||
class="video-small"
|
||||
src="/img/satoshi.gif"
|
||||
title="{{copayer + (copayer == $root.wallet.network.peerId?' (You)':'')}}" />
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
|
|
@ -127,7 +127,7 @@ Wallet.prototype._handleNetworkChange = function(newCopayerId) {
|
|||
if (newCopayerId) {
|
||||
this.log('#### Setting new PEER:', newCopayerId);
|
||||
this.sendWalletId(newCopayerId);
|
||||
this.emit('peer', newCopayerId);
|
||||
this.emit('peer', this.network.peerFromCopayer(newCopayerId));
|
||||
}
|
||||
this.emit('refresh');
|
||||
};
|
||||
|
@ -176,13 +176,13 @@ Wallet.prototype.netStart = function() {
|
|||
signingKeyHex: self.privateKey.getSigningKey(),
|
||||
};
|
||||
|
||||
net.start(function() {
|
||||
net.start(startOpts, function() {
|
||||
self.emit('created', net.getPeer());
|
||||
var registered = self.getRegisteredPeerIds();
|
||||
for (var i=0; i<registered.length; i++) {
|
||||
var otherPeerId = registered[i];
|
||||
if (otherPeerId !== myPeerId) {
|
||||
net.connectTo(otherPeerId);
|
||||
for (var i = 0; i < self.publicKeyRing.registeredCopayers(); i++) {
|
||||
var otherId = self.getCopayerId(i);
|
||||
if (otherId !== myId) {
|
||||
net.connectTo(otherId);
|
||||
}
|
||||
if (self.firstCopayerId) {
|
||||
self.sendWalletReady(self.firstCopayerId);
|
||||
|
@ -200,7 +200,9 @@ Wallet.prototype.getOnlinePeerIDs = function() {
|
|||
Wallet.prototype.getRegisteredPeerIds = function() {
|
||||
var ret = [];
|
||||
for (var i = 0; i < this.publicKeyRing.registeredCopayers(); i++) {
|
||||
ret.push(this.getPeerId(i));
|
||||
var cid = this.getCopayerId(i)
|
||||
var pid = this.network.peerFromCopayer(cid);
|
||||
ret.push(pid);
|
||||
}
|
||||
return ret;
|
||||
};
|
||||
|
@ -212,8 +214,7 @@ Wallet.prototype.store = function(isSync) {
|
|||
|
||||
if (isSync) {
|
||||
this.log('Wallet stored.'); //TODO
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
this.log('Wallet stored. REFRESH Emitted'); //TODO
|
||||
this.emit('refresh');
|
||||
}
|
||||
|
@ -496,14 +497,18 @@ Wallet.prototype.createTxSync = function(toAddress, amountSatStr, utxos, opts) {
|
|||
}
|
||||
|
||||
if (!opts.remainderOut) {
|
||||
opts.remainderOut ={ address: this.generateAddress(true).toString() };
|
||||
opts.remainderOut = {
|
||||
address: this.generateAddress(true).toString()
|
||||
};
|
||||
}
|
||||
|
||||
var b = new Builder(opts)
|
||||
.setUnspent(utxos)
|
||||
.setHashToScriptMap(pkr.getRedeemScriptMap())
|
||||
.setOutputs([{address: toAddress, amountSat: amountSat}])
|
||||
;
|
||||
.setOutputs([{
|
||||
address: toAddress,
|
||||
amountSat: amountSat
|
||||
}]);
|
||||
|
||||
var signRet;
|
||||
if (priv) {
|
||||
|
|
|
@ -37,7 +37,6 @@ angular.module('copay.controllerUtils')
|
|||
root.setupUxHandlers = function(w) {
|
||||
var handlePeerVideo = function(err, peerID, url) {
|
||||
if (err) {
|
||||
root.onErrorDigest(err);
|
||||
return;
|
||||
}
|
||||
$rootScope.videoSrc[peerID] = encodeURI(url);
|
||||
|
|
|
@ -11,6 +11,7 @@ var Video = function() {
|
|||
Video.prototype.setOwnPeer = function(peer, wallet, cb) {
|
||||
var self = this;
|
||||
|
||||
|
||||
navigator.getUserMedia({
|
||||
audio: true,
|
||||
video: true
|
||||
|
|
Loading…
Reference in New Issue