mirror of https://github.com/BTCPrivate/copay.git
Fix receive and copayers views
This commit is contained in:
parent
88b25257ae
commit
f57383e2cf
|
@ -20,7 +20,7 @@
|
|||
<ion-spinner class="spinner-dark" icon="lines"></ion-spinner>
|
||||
</div>
|
||||
</div>
|
||||
<div class="secret" ng-show="!isCordova">
|
||||
<div class="secret">
|
||||
{{secret || ('Loading...'|translate)}}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -29,11 +29,11 @@
|
|||
|
||||
<div ng-show="secret">
|
||||
<div class="text-center m10t" ng-if="isCordova">
|
||||
<span class="button outline round dark-gray tiny m0"
|
||||
<button class="button button-outline button-positive"
|
||||
ng-click="shareSecret()">
|
||||
<i class="fi-share"></i>
|
||||
<i class="icon ion-ios-upload-outline"></i>
|
||||
<span translate>Share invitation</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="m30v line-t">
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</ion-nav-bar>
|
||||
<ion-content>
|
||||
<div id="address">
|
||||
<article class="text-center" ng-if="!wallet.isComplete()">
|
||||
<article class="text-center" ng-if="wallet && !wallet.isComplete()">
|
||||
<div class="incomplete">
|
||||
<div class="title">
|
||||
<span translate>Incomplete wallet</span>
|
||||
|
@ -30,7 +30,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</article>
|
||||
<article ng-if="wallet.isComplete()">
|
||||
<article ng-if="wallet && wallet.isComplete()">
|
||||
<div class="row backup" ng-show="!wallet.showBackupNeededModal && wallet.needsBackup" ng-click="goToBackupFlow()">
|
||||
<div class="m15t text-center col center-block">
|
||||
<i class="icon ion-alert"></i><span translate>Wallet not backed up</span><i class="icon ion-ios-arrow-thin-right"></i>
|
||||
|
|
|
@ -33,32 +33,14 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
|||
|
||||
$scope.addr = null;
|
||||
$scope.generatingAddress = true;
|
||||
$timeout(function() {
|
||||
walletService.getAddress($scope.wallet, forceNew, function(err, addr) {
|
||||
$scope.generatingAddress = false;
|
||||
if (err) popupService.showAlert(gettextCatalog.getString('Error'), err);
|
||||
$scope.addr = addr;
|
||||
if ($scope.wallet.showBackupNeededModal) $scope.openBackupNeededModal();
|
||||
$scope.$apply();
|
||||
});
|
||||
}, 100);
|
||||
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
if (!$scope.isCordova) $scope.checkTips();
|
||||
$scope.wallets = profileService.getWallets();
|
||||
$scope.$on('Wallet/Changed', function(event, wallet) {
|
||||
if (!wallet) {
|
||||
$log.debug('No wallet provided');
|
||||
return;
|
||||
}
|
||||
$scope.wallet = wallet;
|
||||
$log.debug('Wallet changed: ' + wallet.name);
|
||||
$scope.setAddress();
|
||||
});
|
||||
});
|
||||
|
||||
$scope.goCopayers = function() {
|
||||
$ionicHistory.removeBackView();
|
||||
$ionicHistory.nextViewOptions({
|
||||
|
@ -99,5 +81,23 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
|||
from: 'tabs.receive',
|
||||
walletId: $scope.wallet.credentials.walletId
|
||||
});
|
||||
};
|
||||
|
||||
if (!$scope.isCordova) $scope.checkTips();
|
||||
$scope.$on('Wallet/Changed', function(event, wallet) {
|
||||
if (!wallet) {
|
||||
$log.debug('No wallet provided');
|
||||
return;
|
||||
}
|
||||
$scope.wallet = wallet;
|
||||
$log.debug('Wallet changed: ' + wallet.name);
|
||||
$scope.setAddress();
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
}, 100);
|
||||
});
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
$scope.wallets = profileService.getWallets();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue