mirror of https://github.com/BTCPrivate/copay.git
add incomplete wallets to receive tab
This commit is contained in:
parent
7cee9a22a5
commit
3a1129e1f8
|
@ -8,10 +8,6 @@
|
|||
<span class="item-note m10l" ng-show="wallet.n > 1 && wallet.isComplete()">
|
||||
{{wallet.m}}-of-{{wallet.n}}
|
||||
</span>
|
||||
<span class="badge badge-assertive" ng-show="!wallet.isComplete()" translate>
|
||||
Incomplete
|
||||
</span>
|
||||
<!-- <i ng-show="wallet.needsBackup" class="icon ion-android-warning assertive"></i> -->
|
||||
</div>
|
||||
</div>
|
||||
</ion-slide-page>
|
||||
|
|
|
@ -8,16 +8,35 @@
|
|||
</ion-nav-buttons>
|
||||
</ion-nav-bar>
|
||||
<ion-content>
|
||||
<article id="address">
|
||||
<div id="address">
|
||||
<article class="text-center" ng-if="!wallet.isComplete()">
|
||||
<div class="incomplete">
|
||||
<div class="title">
|
||||
<span translate>Incomplete wallet</span>
|
||||
</div>
|
||||
<div class="subtitle">
|
||||
<span translate>All signing devices must be added to this multisig wallet before bitcoin addresses can be created.</span>
|
||||
</div>
|
||||
<div>
|
||||
<button class="button button-block button-positive" ng-click="goCopayers()" translate>Open wallet</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row border-top">
|
||||
<div class="col col-90 center-block bit-address text-center">
|
||||
<div class="item item-icon-left">
|
||||
<i class="icon ion-social-bitcoin-outline"></i>
|
||||
<span class="bit-address-gen-address" ng-if="!generatingAddress" translate>address not yet available</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
<article ng-if="wallet.isComplete()">
|
||||
<div class="row">
|
||||
<div class="m15t text-center col center-block" copy-to-clipboard="addr">
|
||||
<qrcode ng-if="addr" size="220" data="bitcoin:{{addr}}"></qrcode>
|
||||
<div ng-if="!addr" style="height:220px; width:220px; margin:auto; background: white; padding-top: 20%;">
|
||||
...
|
||||
</div>
|
||||
<div ng-if="wallet.needsBackup" class="assertive m10t" translate>
|
||||
Before receiving funds, you must backup your wallet. If this device is lost, it is impossible to access your funds without a backup.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
@ -44,6 +63,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
<article id="wallets">
|
||||
<div class="list card padding text-center" ng-if="!wallets[0]">
|
||||
<span translate>No Wallet</span>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('tabReceiveController', function($scope, $timeout, $log, $ionicModal, storageService, platformInfo, walletService, profileService, configService, lodash, gettextCatalog, popupService) {
|
||||
angular.module('copayApp.controllers').controller('tabReceiveController', function($scope, $timeout, $log, $ionicModal, $state, $ionicHistory, storageService, platformInfo, walletService, profileService, configService, lodash, gettextCatalog, popupService) {
|
||||
|
||||
$scope.isCordova = platformInfo.isCordova;
|
||||
$scope.isNW = platformInfo.isNW;
|
||||
|
@ -29,7 +29,7 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
|||
};
|
||||
|
||||
$scope.setAddress = function(forceNew) {
|
||||
if ($scope.generatingAddress) return;
|
||||
if ($scope.generatingAddress || !$scope.wallet.isComplete()) return;
|
||||
|
||||
$scope.addr = null;
|
||||
$scope.generatingAddress = true;
|
||||
|
@ -46,9 +46,7 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
|||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
if (!$scope.isCordova) $scope.checkTips();
|
||||
$scope.wallets = profileService.getWallets({
|
||||
onlyComplete: true
|
||||
});
|
||||
$scope.wallets = profileService.getWallets();
|
||||
$scope.$on('Wallet/Changed', function(event, wallet) {
|
||||
if (!wallet) {
|
||||
$log.debug('No wallet provided');
|
||||
|
@ -59,4 +57,18 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
|||
$scope.setAddress();
|
||||
});
|
||||
});
|
||||
|
||||
$scope.goCopayers = function() {
|
||||
$ionicHistory.removeBackView();
|
||||
$ionicHistory.nextViewOptions({
|
||||
disableAnimate: true
|
||||
});
|
||||
$state.go('tabs.home');
|
||||
$timeout(function() {
|
||||
$state.transitionTo('tabs.copayers', {
|
||||
walletId: $scope.wallet.credentials.walletId
|
||||
});
|
||||
}, 100);
|
||||
};
|
||||
|
||||
});
|
||||
|
|
|
@ -9,6 +9,20 @@
|
|||
}
|
||||
#address {
|
||||
background: #fff;
|
||||
.incomplete {
|
||||
padding: 50px;
|
||||
.title {
|
||||
padding: 20px;
|
||||
font-size: 25px;
|
||||
color: #444;
|
||||
}
|
||||
.subtitle {
|
||||
padding: 20px;
|
||||
color: #444;
|
||||
}
|
||||
.button {
|
||||
}
|
||||
}
|
||||
.item {
|
||||
border: none;
|
||||
font-size: .8rem;
|
||||
|
|
Loading…
Reference in New Issue