Fix tab-receibe view. Fix wallet-details

This commit is contained in:
Gustavo Maximiliano Cortez 2016-09-30 12:27:31 -03:00
commit 18c0d829c7
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
6 changed files with 37 additions and 19 deletions

View file

@ -8,7 +8,27 @@
</ion-nav-buttons> </ion-nav-buttons>
</ion-nav-bar> </ion-nav-bar>
<ion-content> <ion-content>
<div id="address"> <div class="list card padding text-center" ng-if="!wallets[0]">
<span translate>No Wallet</span>
</div>
<div id="address" ng-if="wallets[0]">
<article class="text-center" ng-if="!wallet">
<div class="row qr">
<div class="text-center col center-block">
<div style="height:225px; width:220px; margin:auto; background: white; padding-top: 25%;">
...
</div>
</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">...</span>
</div>
</div>
</div>
</article>
<article class="text-center" ng-if="wallet && !wallet.isComplete()"> <article class="text-center" ng-if="wallet && !wallet.isComplete()">
<div class="incomplete"> <div class="incomplete">
<div class="title"> <div class="title">
@ -32,14 +52,14 @@
</article> </article>
<article ng-if="wallet && wallet.isComplete()"> <article ng-if="wallet && wallet.isComplete()">
<div class="row backup" ng-show="!wallet.showBackupNeededModal && wallet.needsBackup" ng-click="goToBackupFlow()"> <div class="row backup" ng-show="!wallet.showBackupNeededModal && wallet.needsBackup" ng-click="goToBackupFlow()">
<div class="m15t text-center col center-block"> <div class="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> <i class="icon ion-alert"></i><span translate>Wallet not backed up</span><i class="icon ion-ios-arrow-thin-right"></i>
</div> </div>
</div> </div>
<div class="row qr"> <div class="row qr">
<div class="m15t text-center col center-block" copy-to-clipboard="addr"> <div class="text-center col center-block" copy-to-clipboard="addr">
<qrcode ng-if="addr" size="220" data="bitcoin:{{addr}}"></qrcode> <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 ng-if="!addr" style="height:225px; width:220px; margin:auto; background: white; padding-top: 25%;">
... ...
</div> </div>
</div> </div>
@ -62,18 +82,15 @@
<div class="col col-90 center-block bit-address text-center"> <div class="col col-90 center-block bit-address text-center">
<div class="item item-icon-left"> <div class="item item-icon-left">
<i class="icon ion-social-bitcoin-outline"></i> <i class="icon ion-social-bitcoin-outline"></i>
<span ng-if="generatingAddress">...</span> <span class="bit-address-gen-address" ng-if="generatingAddress">...</span>
<span class="bit-address-gen-address" ng-if="!generatingAddress" copy-to-clipboard="addr">{{addr}}</span> <span class="bit-address-gen-address" ng-if="!generatingAddress" copy-to-clipboard="addr">{{addr}}</span>
</div> </div>
</div> </div>
</div> </div>
</article> </article>
</div> </div>
<article id="wallets"> <article id="wallets" ng-if="wallets[0]">
<div class="list card padding text-center" ng-if="!wallets[0]"> <div class="list">
<span translate>No Wallet</span>
</div>
<div class="list" ng-if="wallets[0]">
<wallets wallets="wallets"></wallets> <wallets wallets="wallets"></wallets>
</div> </div>
</article> </article>

View file

@ -111,7 +111,7 @@
No transactions yet No transactions yet
</div> </div>
<div ng-show="updatingTxHistory && updatingTxHistoryProgress>5" class="updatingHistory"> <div ng-show="updatingTxHistory" class="updatingHistory">
<div class="row" > <div class="row" >
<ion-spinner class="spinner-dark" icon="lines"></ion-spinner> <ion-spinner class="spinner-dark" icon="lines"></ion-spinner>
</div> </div>

View file

@ -4,6 +4,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
function($rootScope, $timeout, $scope, $state, $stateParams, $ionicModal, $ionicScrollDelegate, gettextCatalog, lodash, popupService, ongoingProcess, profileService, walletService, configService, $log, platformInfo, storageService, txpModalService, $window, bitpayCardService) { function($rootScope, $timeout, $scope, $state, $stateParams, $ionicModal, $ionicScrollDelegate, gettextCatalog, lodash, popupService, ongoingProcess, profileService, walletService, configService, $log, platformInfo, storageService, txpModalService, $window, bitpayCardService) {
var wallet; var wallet;
var listeners = []; var listeners = [];
var notifications = [];
$scope.externalServices = {}; $scope.externalServices = {};
$scope.bitpayCardEnabled = true; // TODO $scope.bitpayCardEnabled = true; // TODO
$scope.openTxpModal = txpModalService.open; $scope.openTxpModal = txpModalService.open;
@ -102,7 +103,6 @@ angular.module('copayApp.controllers').controller('tabHomeController',
var i = $scope.wallets.length; var i = $scope.wallets.length;
var j = 0; var j = 0;
var timeSpan = 60 * 60 * 24 * 7; var timeSpan = 60 * 60 * 24 * 7;
var notifications = [];
lodash.each($scope.wallets, function(wallet) { lodash.each($scope.wallets, function(wallet) {
walletService.getStatus(wallet, {}, function(err, status) { walletService.getStatus(wallet, {}, function(err, status) {

View file

@ -38,6 +38,9 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
if (err) popupService.showAlert(gettextCatalog.getString('Error'), err); if (err) popupService.showAlert(gettextCatalog.getString('Error'), err);
$scope.addr = addr; $scope.addr = addr;
if ($scope.wallet.showBackupNeededModal) $scope.openBackupNeededModal(); if ($scope.wallet.showBackupNeededModal) $scope.openBackupNeededModal();
$timeout(function() {
$scope.$apply();
}, 100);
}); });
}; };

View file

@ -122,9 +122,6 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
$scope.updatingTxHistoryProgress = txs ? txs.length : 0; $scope.updatingTxHistoryProgress = txs ? txs.length : 0;
$scope.completeTxHistory = txs; $scope.completeTxHistory = txs;
$scope.showHistory(); $scope.showHistory();
$timeout(function() {
$scope.$apply();
});
}; };
$timeout(function() { $timeout(function() {
@ -139,9 +136,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
} }
$scope.completeTxHistory = txHistory; $scope.completeTxHistory = txHistory;
$scope.showHistory(); $scope.showHistory();
$timeout(function() { $scope.$apply();
$scope.$apply();
});
return cb(); return cb();
}); });
}); });

View file

@ -11,6 +11,7 @@
background: #fff; background: #fff;
.incomplete { .incomplete {
padding: 50px; padding: 50px;
height: 350px;
.title { .title {
padding: 20px; padding: 20px;
font-size: 25px; font-size: 25px;
@ -44,11 +45,13 @@
&-gen-address {} &-gen-address {}
} }
.qr { .qr {
padding: 30px; padding: 50px 0 20px 0;
} }
.backup { .backup {
background-color: orange; background-color: orange;
color: #fff; color: #fff;
position: absolute;
top: 5px;
i { i {
padding: 10px; padding: 10px;
} }