better -generating address- status
This commit is contained in:
parent
92e6015e3a
commit
9ab6c09d5d
4 changed files with 40 additions and 13 deletions
BIN
public/img/qr.png
Normal file
BIN
public/img/qr.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
|
|
@ -185,16 +185,36 @@
|
|||
</div>
|
||||
</div>
|
||||
<div ng-show="!index.needsBackup || home.skipBackup">
|
||||
<div class="row" ng-if="home.addr">
|
||||
<div class="row">
|
||||
<!-- Address-->
|
||||
<div class="large-12 columns">
|
||||
<h2 class="text-center m10t" translate>My Bitcoin address</h2>
|
||||
<div ng-show="!home.generatingAddress">
|
||||
<div class="text-center" ng-click="home.copyAddress(home.addr)">
|
||||
<qrcode size="220" data="bitcoin:{{home.addr}}"></qrcode>
|
||||
<div class="m10t">
|
||||
<h4 ng-class="{'enable_text_select': !index.isCordova}" class="size-12">{{home.addr}}</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="home.generatingAddress">
|
||||
<div class="text-center" style="margin-bottom:14px;">
|
||||
<div style="height:220px; width:220px; margin:auto; background: url(img/qr.png) white">
|
||||
<div class="spinner" style="margin-top:80px">
|
||||
<div class="rect1"></div>
|
||||
<div class="rect2"></div>
|
||||
<div class="rect3"></div>
|
||||
<div class="rect4"></div>
|
||||
<div class="rect5"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="m10t">
|
||||
<h4 class="size-12">...</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="m10t text-center" ng-show="index.isCordova">
|
||||
<span class="button outline dark-gray tiny"
|
||||
ng-click="home.shareAddress(home.addr)">
|
||||
|
|
@ -207,10 +227,10 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m20t" ng-if="home.addr">
|
||||
<div class="row m20t">
|
||||
<div class="large-12 columns">
|
||||
<button class="button black expand radius" ng-click="home.newAddress()"
|
||||
ng-style="{'background-color':index.backgroundColor}" ng-disabled="home.blockUx || index.isOffline" translate>
|
||||
ng-style="{'background-color':index.backgroundColor}" ng-disabled="home.blockUx || index.isOffline ||home.generatingAddress" translate>
|
||||
Generate new address
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1144,11 +1144,13 @@ input.ng-invalid-match, input.ng-invalid-match:focus {
|
|||
|
||||
/*/////////////////// SPINNER ////////////////////*/
|
||||
|
||||
#history .spinner {
|
||||
#history .spinner, #receive .spinner {
|
||||
height: 46px;
|
||||
}
|
||||
|
||||
#history .spinner > div {
|
||||
#history .spinner > div,
|
||||
#receive .spinner > div
|
||||
{
|
||||
background-color: #7A8C9E;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -272,17 +272,21 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
|
||||
this.newAddress = function() {
|
||||
var fc = profileService.focusedClient;
|
||||
self.setOngoingProcess('Generating Address');
|
||||
self.generatingAddress = true;
|
||||
fc.createAddress(function(err, addr) {
|
||||
self.setOngoingProcess();
|
||||
if (err) {
|
||||
$log.debug('Creating address ERROR:', err);
|
||||
$scope.$emit('Local/ClientError', err);
|
||||
} else {
|
||||
self.addr = addr.address;
|
||||
storageService.storeLastAddress(fc.credentials.walletId, addr.address, function() {});
|
||||
self.generatingAddress = false;
|
||||
$scope.$digest();
|
||||
return;
|
||||
}
|
||||
$scope.$digest();
|
||||
self.addr = addr.address;
|
||||
storageService.storeLastAddress(fc.credentials.walletId, addr.address, function() {
|
||||
|
||||
self.generatingAddress = false;
|
||||
$scope.$digest();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -290,7 +294,8 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
var fc = profileService.focusedClient;
|
||||
$timeout(function() {
|
||||
storageService.getLastAddress(fc.credentials.walletId, function(err, addr) {
|
||||
if (addr) {
|
||||
// TODO
|
||||
if (addr && 0) {
|
||||
self.addr = addr;
|
||||
} else {
|
||||
self.newAddress();
|
||||
|
|
@ -500,7 +505,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
profileService.lockFC();
|
||||
self.setOngoingProcess();
|
||||
|
||||
if (err) {
|
||||
if (err) {
|
||||
return cb(err);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue