Merge remote-tracking branch 'bitpay-wallet/ref/design' into feature/settings-polish

This commit is contained in:
Jason Dreyzehner 2016-10-12 22:04:02 -04:00
commit ff45e1dbc8
9 changed files with 62 additions and 51 deletions

View file

@ -3,15 +3,11 @@
angular.module('copayApp.controllers').controller('copayersController',
function($scope, $log, $timeout, $stateParams, $state, $rootScope, $ionicHistory, lodash, profileService, walletService, popupService, platformInfo, gettextCatalog, ongoingProcess) {
$scope.isCordova = platformInfo.isCordova;
$scope.$on("$ionicView.beforeEnter", function(event, data) {
init();
});
var init = function() {
$scope.isCordova = platformInfo.isCordova;
$scope.wallet = profileService.getWallet($stateParams.walletId);
$scope.wallet = profileService.getWallet(data.stateParams.walletId);
updateWallet();
};
});
$rootScope.$on('bwsEvent', function() {
updateWallet();
@ -40,7 +36,9 @@ angular.module('copayApp.controllers').controller('copayersController',
};
$scope.showDeletePopup = function() {
popupService.showConfirm(gettextCatalog.getString('Confirm'), gettextCatalog.getString('Are you sure you want to delete this wallet?'), null, null, function(res) {
var title = gettextCatalog.getString('Confirm');
var msg = gettextCatalog.getString('Are you sure you want to cancel and delete this wallet?');
popupService.showConfirm(title, msg, null, null, function(res) {
if (res) deleteWallet();
});
};

View file

@ -34,6 +34,9 @@ angular.module('copayApp.controllers').controller('tourController',
var rate = rateService.toFiat(btcAmount * 1e8, localCurrency);
$scope.localCurrencySymbol = '$';
$scope.localCurrencyPerBtc = $filter('formatFiatAmount')(parseFloat(rate.toFixed(2), 10));
$timeout(function() {
$scope.$apply();
})
});
});
@ -50,7 +53,7 @@ angular.module('copayApp.controllers').controller('tourController',
ongoingProcess.set('creatingWallet', false);
popupService.showAlert(
gettextCatalog.getString('Cannot Create Wallet'), err,
function() {
function() {
retryCount = 0;
return $scope.createDefaultWallet();
}, gettextCatalog.getString('Retry'));

View file

@ -106,7 +106,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
var updateHasFunds = function() {
$scope.hasFunds = true;
$scope.hasFunds = null;
var wallets = profileService.getWallets({
onlyComplete: true,
@ -127,16 +127,16 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
$log.error(err);
return;
}
if (status.availableBalanceSat && status.availableBalanceSat > 0) {
if (status.availableBalanceSat) {
$scope.hasFunds = true;
}
else $scope.hasFunds = false;
if (index == wallets.length) {
$scope.hasFunds = $scope.hasFunds || false;
$timeout(function() {
$scope.$apply();
});
}
$timeout(function() {
$scope.$apply();
})
});
});
};

View file

@ -35,7 +35,8 @@ $button-secondary-active-border: transparent;
@include button-outline($button-primary-bg);
}
&.button-primary,
&.button-secondary {
&.button-secondary,
&.button-assertive {
&.button-standard {
@extend %button-standard;
& + .button-standard {

View file

@ -1,7 +1,13 @@
.copayers-secret {
overflow-wrap: break-word;
word-wrap: break-word;
text-align: center;
font-size: 14px;
font-size: 12px;
margin: 10px;
white-space: -moz-pre-wrap !important;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
white-space: pre-wrap;
word-wrap: break-word;
white-space: -webkit-pre-wrap;
word-break: break-all;
white-space: normal;
}

View file

@ -4,26 +4,29 @@
<ion-nav-back-button>
</ion-nav-back-button>
<ion-nav-title>{{wallet.name}}</ion-nav-title>
<ion-nav-buttons side="secondary">
<button class="button button-clear" ng-click="showDeletePopup()">
Cancel
</button>
</ion-nav-buttons>
</ion-nav-bar>
<ion-content>
<div ng-show="!wallet.notAuthorized">
<div class="list card text-center">
<a class="item item-heading" ng-style="{'border-width': 0}" translate>
<div class="item item-heading item-text-wrap" translate>
Share this invitation with your copayers
</a>
<div ng-click="copySecret()" ng-class="{'enable_text_select': !isCordova}">
<div class="text-center" copy-to-clipboard="secret">
<qrcode size="220" error-correction-level="L" data="{{secret}}"></qrcode>
<div ng-show="!secret" style="position:relative; top:-226px; height:0px">
<div style="height:220px; width:220px; margin:auto; background: white">
<ion-spinner class="spinner-dark" icon="lines"></ion-spinner>
</div>
</div>
<div class="copayers-secret">
{{secret || ('Loading...'|translate)}}
</div>
<div class="item text-center" copy-to-clipboard="secret" ng-click="copySecret()">
<qrcode size="220" error-correction-level="L" data="{{secret}}"></qrcode>
<div ng-show="!secret" style="position:relative; top:-226px; height:0px">
<div style="height:220px; width:220px; margin:auto; background: white">
<ion-spinner class="spinner-dark" icon="lines"></ion-spinner>
</div>
</div>
<div class="copayers-secret">
{{secret || ('Loading...'|translate)}}
</div>
</div>
</div>
@ -36,30 +39,24 @@
</button>
</div>
<div class="m30v line-t">
<h4 class="size-14 p10h m10t">
<span translate>Waiting for copayers</span>
<div class="list">
<div class="item item-heading">
<span class="text-gray right">
[ <span translate>{{wallet.m}}-of-{{wallet.n}}</span> ]
</span>
</h4>
<span translate>Waiting for copayers</span>
</div>
<div ng-include="'views/includes/copayers.html'"></div>
<div ng-if="!wallet.isComplete()" class="line-b p10 white size-12">
<div ng-if="!wallet.isComplete()" class="item item-icon-left">
<i class="icon ion-loop"></i>
<span translate>Waiting...</span>
{{'Waiting...'|translate}}
</div>
</div>
<div class="m20b text-center" ng-show="wallet.notAuthorized">
<div class="m30v text-center" ng-show="wallet.notAuthorized">
<h1 translate>Wallet incomplete and broken</h1>
<h4 translate>Delete it and create a new one</h4>
</div>
<div class="text-center">
<button class="button button-block button-assertive" ng-click="showDeletePopup()">
<i class="fi-trash"></i> <span translate>Cancel and delete the wallet</span>
</button>
</div>
</div>
</div>
</ion-content>

View file

@ -1,8 +1,10 @@
<div ng-repeat="copayer in copayers">
<span class="item size-12" ng-show="copayer.id == wallet.copayerId">
<i class="icon ion-checkmark"></i> {{'Me'|translate}}
<div class="item item-icon-left" ng-repeat="copayer in copayers">
<span ng-show="copayer.id == wallet.copayerId">
<i class="icon ion-checkmark"></i>
{{'Me'|translate}}
</span>
<span class="item size-12 text-gray" ng-show="copayer.id != wallet.copayerId">
<i class="icon ion-checkmark"></i> {{copayer.name}}
<span ng-show="copayer.id != wallet.copayerId">
<i class="icon ion-checkmark"></i>
{{copayer.name}}
</span>
</div>

View file

@ -16,6 +16,10 @@
</p>
</div>
</div>
<button class="button button-block button-assertive" ng-click="showDeletePopup()"translate>Delete <span ng-show="alias">{{alias}}</span>{{walletName}}</button>
<div class="padding">
<button class="button button-standard button-assertive" ng-click="showDeletePopup()">
{{'Delete'|translate}} <span ng-show="alias">{{alias}}</span>{{walletName}}
</button>
</div>
</ion-content>
</ion-view>

View file

@ -2,7 +2,7 @@
<ion-nav-bar class="bar-royal">
<ion-nav-title>{{'Send' | translate}}</ion-nav-title>
</ion-nav-bar>
<ion-content class="ng-hide" scroll="false" ng-show="!hasFunds">
<ion-content scroll="false" class="ng-hide" ng-show="!hasFunds">
<div class="zero-state">
<i class="icon zero-state-icon">
<img src="img/tab-icons/ico-send-selected.svg"/>