mirror of https://github.com/BTCPrivate/copay.git
fix conflict qr modal
This commit is contained in:
commit
1a6585a358
|
@ -1085,4 +1085,12 @@ a.text-white:hover {color: #ccc;}
|
|||
text-align: left;
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 40.063em) {
|
||||
dialog.tiny, .reveal-modal.tiny {
|
||||
width: 50%;
|
||||
margin-left: -25%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------*/
|
||||
|
|
|
@ -20,13 +20,6 @@ angular.module('copayApp.controllers').controller('AddressesController',
|
|||
var ModalInstanceCtrl = function ($scope, $modalInstance, address) {
|
||||
$scope.address = address;
|
||||
|
||||
$scope.openExternal = function(address) {
|
||||
var url = 'bitcoin:' + address;
|
||||
if (window.cordova) return window.open(url, '_blank');
|
||||
|
||||
window.location = url;
|
||||
}
|
||||
|
||||
$scope.cancel = function () {
|
||||
$modalInstance.dismiss('cancel');
|
||||
};
|
||||
|
|
|
@ -198,24 +198,31 @@ angular.module('copayApp.directives')
|
|||
}
|
||||
};
|
||||
})
|
||||
// From https://gist.github.com/asafge/7430497
|
||||
.directive('ngReallyClick', [
|
||||
|
||||
function() {
|
||||
.directive('openExternal', function() {
|
||||
return {
|
||||
restrict: 'A',
|
||||
link: function(scope, element, attrs) {
|
||||
element.bind('click', function() {
|
||||
var message = attrs.ngReallyMessage;
|
||||
if (message && confirm(message)) {
|
||||
scope.$apply(attrs.ngReallyClick);
|
||||
}
|
||||
window.open('bitcoin:'+attrs.address, '_blank');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
})
|
||||
// From https://gist.github.com/asafge/7430497
|
||||
.directive('ngReallyClick', [function() {
|
||||
return {
|
||||
restrict: 'A',
|
||||
link: function(scope, element, attrs) {
|
||||
element.bind('click', function() {
|
||||
var message = attrs.ngReallyMessage;
|
||||
if (message && confirm(message)) {
|
||||
scope.$apply(attrs.ngReallyClick);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
])
|
||||
.directive('match', function () {
|
||||
return {
|
||||
require: 'ngModel',
|
||||
|
@ -231,5 +238,4 @@ angular.module('copayApp.directives')
|
|||
});
|
||||
}
|
||||
};
|
||||
})
|
||||
;
|
||||
});
|
||||
|
|
|
@ -212,6 +212,10 @@ angular.module('copayApp.services')
|
|||
$rootScope.totalBalanceBTC = (balanceSat / COIN);
|
||||
$rootScope.availableBalance = safeBalanceSat * satToUnit;
|
||||
$rootScope.availableBalanceBTC = (safeBalanceSat / COIN);
|
||||
|
||||
$rootScope.lockedBalance = (balanceSat - safeBalanceSat) * satToUnit;
|
||||
$rootScope.lockedBalanceBTC = (balanceSat - safeBalanceSat) / COIN;
|
||||
|
||||
var balanceByAddr = {};
|
||||
for (var ii in balanceByAddrSat) {
|
||||
balanceByAddr[ii] = balanceByAddrSat[ii] * satToUnit;
|
||||
|
|
|
@ -93,8 +93,12 @@ describe("Unit: controllerUtils", function() {
|
|||
controllerUtils.updateBalance(function() {
|
||||
expect($rootScope.totalBalanceBTC).to.be.equal(1.00000001);
|
||||
expect($rootScope.availableBalanceBTC).to.be.equal(0.90000002);
|
||||
expect($rootScope.lockedBalanceBTC).to.be.equal(0.09999999);
|
||||
|
||||
expect($rootScope.totalBalance).to.be.equal(1000000.01);
|
||||
expect($rootScope.availableBalance).to.be.equal(900000.02);
|
||||
expect($rootScope.lockedBalance).to.be.equal(99999.99);
|
||||
|
||||
expect($rootScope.addrInfos).not.to.equal(null);
|
||||
expect($rootScope.addrInfos[0].address).to.equal(Waddr);
|
||||
});
|
||||
|
|
|
@ -24,16 +24,16 @@
|
|||
</span>
|
||||
</div>
|
||||
<div>
|
||||
Available
|
||||
Locked
|
||||
<span ng-if="$root.updatingBalance">
|
||||
<i class="fi-bitcoin-circle icon-rotate spinner"></i>
|
||||
</span>
|
||||
<span ng-show="!$root.updatingBalance"
|
||||
data-options="disable_for_touch:true"
|
||||
tooltip="{{availableBalanceBTC || 0 |noFractionNumber:8}} BTC"
|
||||
tooltip="{{lockedBalanceBTC || 0 |noFractionNumber:8}} BTC"
|
||||
tooltip-trigger="mouseenter"
|
||||
tooltip-placement="bottom">{{availableBalance || 0|noFractionNumber}} {{$root.unitName}}
|
||||
</span>
|
||||
tooltip-placement="bottom">{{lockedBalance || 0|noFractionNumber}} {{$root.unitName}}
|
||||
</span> <i class="fi-info medium" tooltip="Balance locked in pending transaction proposals" tooltip-placement="bottom"></i>
|
||||
</div>
|
||||
<div class="line-sidebar-b"></div>
|
||||
</div>
|
||||
|
|
|
@ -32,16 +32,16 @@
|
|||
|noFractionNumber}} {{$root.unitName}}
|
||||
</span>
|
||||
<br>
|
||||
Available
|
||||
Locked
|
||||
<span ng-if="$root.updatingBalance">
|
||||
<i class="fi-bitcoin-circle icon-rotate spinner"></i>
|
||||
</span>
|
||||
<span ng-show="!$root.updatingBalance"
|
||||
data-options="disable_for_touch:true"
|
||||
tooltip="{{availableBalanceBTC || 0 |noFractionNumber:8}} BTC"
|
||||
tooltip="{{lockedBalanceBTC || 0 |noFractionNumber:8}} BTC"
|
||||
tooltip-trigger="mouseenter"
|
||||
tooltip-placement="bottom">{{availableBalance || 0|noFractionNumber}} {{$root.unitName}}
|
||||
</span>
|
||||
tooltip-placement="bottom">{{lockedBalance || 0|noFractionNumber}} {{$root.unitName}}
|
||||
</span> <i class="fi-info medium" tooltip="Balance locked in pending transaction proposals" tooltip-placement="bottom"></i>
|
||||
</div>
|
||||
<div class="line-sidebar"></div>
|
||||
</header>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<p class="m15b" ng-if="!$root.updatingBalance">
|
||||
{{address.balance || 0|noFractionNumber}} {{$root.unitName}}
|
||||
</p>
|
||||
<button class="m15t button secondary" ng-click="openExternal(address.address)">
|
||||
<button class="m15t button secondary" open-external address="{{address.address}}">
|
||||
<i class="fi-link"> </i> Open in external aplication
|
||||
</button>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue