From 3a1129e1f8901410428361f9f1ff81c985e5c2bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Mon, 26 Sep 2016 11:26:10 -0300 Subject: [PATCH] add incomplete wallets to receive tab --- public/views/includes/wallets.html | 4 -- public/views/tab-receive.html | 74 +++++++++++++++++++----------- src/js/controllers/tab-receive.js | 22 +++++++-- src/sass/views/tab-receive.scss | 14 ++++++ 4 files changed, 78 insertions(+), 36 deletions(-) diff --git a/public/views/includes/wallets.html b/public/views/includes/wallets.html index 1c2a7a569..75f8b9efc 100644 --- a/public/views/includes/wallets.html +++ b/public/views/includes/wallets.html @@ -8,10 +8,6 @@ {{wallet.m}}-of-{{wallet.n}} - - Incomplete - - diff --git a/public/views/tab-receive.html b/public/views/tab-receive.html index 7a1283d4b..c445a2624 100644 --- a/public/views/tab-receive.html +++ b/public/views/tab-receive.html @@ -8,42 +8,62 @@ -
-
-
- -
- ... +
+
+
+
+ Incomplete wallet
-
- Before receiving funds, you must backup your wallet. If this device is lost, it is impossible to access your funds without a backup. +
+ All signing devices must be added to this multisig wallet before bitcoin addresses can be created. +
+
+
-
-
-
-
- - Share +
+
+
+ + address not yet available +
-
-
- - Next Address +
+
+
+
+ +
+ ... +
-
-
-
-
- - ... - {{addr}} +
+
+
+ + Share +
+
+
+
+ + Next Address +
-
-
+
+
+
+ + ... + {{addr}} +
+
+
+ +
No Wallet diff --git a/src/js/controllers/tab-receive.js b/src/js/controllers/tab-receive.js index 5849cd77b..5cb57dcb2 100644 --- a/src/js/controllers/tab-receive.js +++ b/src/js/controllers/tab-receive.js @@ -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); + }; + }); diff --git a/src/sass/views/tab-receive.scss b/src/sass/views/tab-receive.scss index aa66bc642..baa2099d0 100644 --- a/src/sass/views/tab-receive.scss +++ b/src/sass/views/tab-receive.scss @@ -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;