Bug fixes

This commit is contained in:
Gustavo Maximiliano Cortez 2015-04-22 02:48:00 -03:00
parent f86a75160f
commit 401490df5e
10 changed files with 140 additions and 160 deletions

View File

@ -38,7 +38,7 @@
ng-class="{'main': index.hasProfile, 'main-dark': mainDark, 'animation-left': index.swipeLeft,
'animation-right': index.swipeRight}"
ui-view="main"></section>
<div ui-view="menu"></div>
<div ui-view="menu" ng-if="!index.noFocusedWallet && !$root.hideMenuBar"></div>
<a class="close-menu" ng-click="index.closeMenu()"></a>
</div>

View File

@ -5,7 +5,9 @@
</div>
<div class="dr-notification-content">
<h3 class="dr-notification-title">Wallet Service Error</h3>
<div class="dr-notification-text ellipsis">{{index.clientError.message || index.clientError}}</div>
<div class="dr-notification-text ellipsis">
{{index.clientError.error || index.clientError.message || index.clientError}}
</div>
</div>
</div>
</div>

View File

@ -1,9 +1,7 @@
<div
ng-show="!index.noFocusedWallet && !hideMenuBar"
class="bottom-bar row collapse"
ng-controller="menuController as menu">
<div class="medium-3 small-3 columns text-center bottombar-item" ng-repeat="item in menu.menu">
<a ng-click="menu.go(item.link)" ng-class="{'active': activeMenu == item.link}"
<div
class="bottom-bar row collapse">
<div class="medium-3 small-3 columns text-center bottombar-item" ng-repeat="item in index.menu">
<a ng-click="$root.go(item.link)" ng-class="{'active': activeMenu == item.link}"
ng-style="{'border-top-color':activeMenu==item.link ? index.backgroundColor : ''}">
<i class="size-36 {{item.icon}} db"></i>
<div class="size-10 tu">

View File

@ -11,7 +11,7 @@
</section>
</nav>
<div class="p45t" ng-init="updateCopayerList()">
<h4 class="title m0" translate> Information </h4>
<h4 class="title m0" translate>Information</h4>
<ul class="no-bullet size-14 m0">
<li class="line-b p10">
<span class="text-gray">To:</span>
@ -85,21 +85,9 @@
</div>
<div class="row column m20t text-center text-warning" ng-if="tx.removed">
<div class="row column m20t text-center text-warning" ng-if="tx.removed" translate>
The transaction was removed by creator
</div>
<div class="row column m20t" ng-if="tx.couldRemove">
<button class="button expand outline dark-gray m0 expand" ng-click="remove(tx);"
ng-disabled="loading" ng-show="tx.couldRemove">
<i class="fi-x icon-sign x"></i>
<span translate>Remove</span>
</button>
<div class="text-gray size-12 text-center" show="tx.couldRemove" translate>
* Only transactions created by yourself with no peer signatures can be removed
</div>
</div>
</div>
<div class="row m20t" ng-if="tx.pendingForUs">
<div class="large-5 medium-5 small-6 columns">
@ -142,5 +130,17 @@
Transaction finally rejected
</div>
</div>
<div class="row column m20t" ng-if="tx.couldRemove">
<button class="tiny expand outline dark-gray" ng-click="remove(tx)"
ng-disabled="loading" ng-show="tx.couldRemove">
<i class="fi-x icon-sign x"></i>
<span translate>Remove transaction</span>
</button>
<div class="text-gray size-12 text-center" show="tx.couldRemove" translate>
* Only transactions created by yourself with no peer signatures can be removed
</div>
</div>
</div>
<div class="extra-margin-bottom"></div>

View File

@ -1,77 +1,69 @@
<div class="receive" ng-controller="receiveController as receive" ng-init="receive.getAddress()">
<div ng-show="index.needsBackup && !receive.skipBackup" class="p60t row text-center">
<div class="text-warning text-bold m15b">
<i class="fi-alert"></i>
<span translate>
WARNING: Backup needed
</span>
</div>
<div class="text-gray m15h" translate>
Before receiving funds, it is highly recommended you backup your wallet keys.
</div>
<div class="small-6 columns m20t">
<span class="button expand outline dark-gray tiny"
ng-click="receive.skipBackup = true">
<span translate>SKIP BACKUP</span>
</span>
</div>
<div class="small-6 columns m20t">
<span class="button black expand radius tiny"
ng-click="$root.go('backup')" ng-style="{'background-color':index.backgroundColor}" >
<span translate>Backup now</span>
</span>
</div>
</div>
<div ng-show="index.needsBackup && !receive.skipBackup" class="p60t row text-center">
<div class="text-warning text-bold m15b">
<i class="fi-alert"></i>
<span translate>
WARNING: Backup needed
</span>
</div>
<div class="text-gray m15h" translate>
Before receiving funds, it is highly recommended you backup your wallet keys.
</div>
<div ng-show="!index.needsBackup || receive.skipBackup">
<div class="row m20t" ng-show="receive.generatingAddress">
<div class="large-12 columns">
<div class="oh text-center">
<span class="text-gray" translate>Generating a new address...</span>
</div>
<div class="small-6 columns m20t">
<span class="button expand outline dark-gray tiny"
ng-click="receive.skipBackup = true">
<span translate>SKIP BACKUP</span>
</span>
</div>
<div class="small-6 columns m20t">
<span class="button black expand radius tiny"
ng-click="$root.go('backup')" ng-style="{'background-color':index.backgroundColor}" >
<span translate>Backup now</span>
</span>
</div>
</div>
<div ng-show="!receive.generatingAddress">
<div class="box-notification" ng-show="receive.error ">
<span class="text-warning size-14">
{{receive.error|translate}}
</span>
</div>
<div class="row" ng-show="receive.addr">
<div ng-show="!index.needsBackup || receive.skipBackup">
<div class="box-notification" ng-show="receive.error ">
<span class="text-warning size-14">
{{receive.error|translate}}
</span>
</div>
<div class="row" ng-if="receive.addr">
<!-- Address-->
<div class="large-12 columns">
<h2 class="text-center m10t" translate>My Bitcoin address:</h2>
<div class="text-center" ng-click="receive.copyAddress(receive.addr)">
<qrcode size="220" data="bitcoin:{{receive.addr}}"></qrcode>
<div class="m10t">
<h4 ng-class="{'enable_text_select': !index.isCordova}" class="size-12">{{receive.addr}}</h4>
</div>
</div>
<div class="m10t text-center" ng-show="index.isCordova">
<span class="button outline dark-gray tiny"
ng-click="receive.shareAddress(receive.addr)">
<i class="fi-share"></i>
<span translate>Share address</span>
</span>
</div>
<div class="line-t size-12" translate>
Share this with anyone to have them send you payments. To protect your privacy, new addresses are generated automatically once you use them.
<h2 class="text-center m10t" translate>My Bitcoin address</h2>
<div class="text-center animated fadeIn" ng-click="receive.copyAddress(receive.addr)">
<qrcode size="220" data="bitcoin:{{receive.addr}}"></qrcode>
<div class="m10t">
<h4 ng-class="{'enable_text_select': !index.isCordova}" class="size-12">{{receive.addr}}</h4>
</div>
</div>
<div class="m10t text-center" ng-show="index.isCordova">
<span class="button outline dark-gray tiny"
ng-click="receive.shareAddress(receive.addr)">
<i class="fi-share"></i>
<span translate>Share address</span>
</span>
</div>
<div class="line-t size-12" translate>
Share this with anyone to have them send you payments. To protect your privacy, new addresses are generated automatically once you use them.
</div>
</div>
</div>
<div class="row m20t" ng-show="receive.addr">
<div class="large-12 columns">
<a class="button black expand radius" ng-click="receive.newAddress()"
ng-style="{'background-color':index.backgroundColor}" translate>
Generate new address
</a>
</div>
<div class="row m20t" ng-if="receive.addr">
<div class="large-12 columns">
<button class="button black expand radius" ng-click="receive.newAddress()"
ng-style="{'background-color':index.backgroundColor}" ng-disabled="receive.generatingAddress" translate>
Generate new address
</button>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,18 +1,17 @@
<div class="home-wallet" ng-controller="walletHomeController as home" ng-init="home.init()">
<div class="row" ng-show="!index.noFocusedWallet">
<div class="home-wallet" ng-controller="walletHomeController as home">
<div class="oh" ng-show="!index.noFocusedWallet">
<div class="amount" ng-style="{'background-color':index.backgroundColor}">
<div ng-if="!index.anyOnGoingProcess && !index.notAuthorized">
<div ng-show="index.updateError" ng-click='index.openWallet()'>
<span translate>Could not update Wallet</span>
<br><span translate>Tap to retry</span>
</div>
<div ng-show="index.walletScanStatus == 'error'" ng-click='index.retryScan()'>
<span translate>Scan status finished with error</span>
<br><span translate>Tap to retry</span>
</div>
<div ng-show="!index.updateError && index.walletScanStatus != 'error'">
<div class="size-36 animated fadeIn">
<strong>{{index.totalBalanceStr}}</strong>
@ -32,31 +31,27 @@
</div>
</div>
</div>
<div class="pr columns line-b">
<div class="avatar-wallet left"
ng-class="{'updating':index.anyOnGoingProcess}"
ng-style="{'background-color':index.backgroundColor}"
>
<div class="">{{index.walletName | limitTo: 1}}</div>
</div>
<div class="right">
<a ng-click="$root.go('preferences')" class="button outline light-gray tiny m0">
<i class="fi-widget size-18 vm"></i>
<span class="show-for-medium-up" translate>Preferences</span>
</a>
</div>
<div class="wallet-info" ng-click="openCopayersModal(index.copayers, index.copayerId)">
<p class="m0">
{{index.m}} <span translate>of</span> {{index.n}}
</p>
<div class="size-12 text-gray">
<span ng-if="index.n > 1" translate>Multisignature wallet </span>
<span ng-if="index.n == 1" translate>Personal Wallet</span>
<span ng-if="index.network != 'livenet'"> - Testnet</span>
</div>
</div>
<div class="pr columns line-b">
<div class="avatar-wallet left"
ng-class="{'updating':index.anyOnGoingProcess}"
ng-style="{'background-color':index.backgroundColor}">{{index.walletName | limitTo: 1}}</div>
<div class="right">
<a ng-click="$root.go('preferences')" class="button outline light-gray tiny m0">
<i class="fi-widget size-18 vm"></i>
<span class="show-for-medium-up" translate>Preferences</span>
</a>
</div>
<div class="wallet-info" ng-click="openCopayersModal(index.copayers, index.copayerId)">
<p class="m0">
{{index.m}} <span translate>of</span> {{index.n}}
</p>
<div class="size-12 text-gray">
<span ng-if="index.n > 1" translate>Multisignature wallet </span>
<span ng-if="index.n == 1" translate>Personal Wallet</span>
<span ng-if="index.network != 'livenet'"> - Testnet</span>
</div>
</div>
</div>
</div>
@ -77,21 +72,21 @@
<div ng-show="index.notAuthorized">
<div class="text-center text-warning">
<div class="text-center text-warning">
<i class="fi-alert"></i>
<span translate>
WARNING: Wallet not registered
</span>
</div>
<div class="text-center text-gray m15r m15l" translate>
This wallet is not registered at the given Bitcore Wallet Service (BWS). You can recreate it from the local information.
</div>
<div class="text-center m10t ">
<span class="button outline dark-gray tiny"
ng-click="index.recreate()"
<span translate>Recreate</span>
</span>
</div>
<span translate>
WARNING: Wallet not registered
</span>
</div>
<div class="text-center text-gray m15r m15l" translate>
This wallet is not registered at the given Bitcore Wallet Service (BWS). You can recreate it from the local information.
</div>
<div class="text-center m10t ">
<span class="button outline dark-gray tiny"
ng-click="index.recreate()">
<span translate>Recreate</span>
</span>
</div>
</div>

View File

@ -652,13 +652,13 @@ a.pin-button:active {
.animation-left.ng-enter {
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
-webkit-transition-delay: 0.1s;
-webkit-transition-delay: 0.05s;
opacity: 0;
}
.animation-right.ng-enter {
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
-webkit-transition-delay: 0.1s;
-webkit-transition-delay: 0.05s;
opacity: 0;
}
.animation-left.ng-enter.ng-enter-active,
@ -672,15 +672,18 @@ a.pin-button:active {
.animation-right.ng-leave {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 0;
}
.animation-left.ng-leave.animation-left.ng-leave-active {
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
-webkit-transition-delay: 0.05s;
opacity: 0;
}
.animation-right.ng-leave.animation-right.ng-leave-active {
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
-webkit-transition-delay: 0.05s;
opacity: 0;
}

View File

@ -6,12 +6,28 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.onGoingProcess = {};
self.limitHistory = 5;
self.hideMenuBar = false;
function strip(number) {
return (parseFloat(number.toPrecision(12)));
};
self.menu = [{
'title': 'Home',
'icon': 'icon-home',
'link': 'walletHome'
}, {
'title': 'Receive',
'icon': 'icon-receive',
'link': 'receive'
}, {
'title': 'Send',
'icon': 'icon-paperplane',
'link': 'send'
}, {
'title': 'History',
'icon': 'icon-history',
'link': 'history'
}];
self.setOngoingProcess = function(processName, isOn) {
$log.debug('onGoingProcess', processName, isOn);
self[processName] = isOn;
@ -193,6 +209,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.openWallet = function() {
var fc = profileService.focusedClient;
self.updateColor();
$rootScope.$apply();
$timeout(function() {
self.setOngoingProcess('openingWallet', true);
self.updateError = false;

View File

@ -1,27 +0,0 @@
'use strict';
angular.module('copayApp.controllers').controller('menuController', function($state) {
this.menu = [{
'title': 'Home',
'icon': 'icon-home',
'link': 'walletHome'
}, {
'title': 'Receive',
'icon': 'icon-receive',
'link': 'receive'
}, {
'title': 'Send',
'icon': 'icon-paperplane',
'link': 'send'
}, {
'title': 'History',
'icon': 'icon-history',
'link': 'history'
}];
this.go = function(state) {
$state.go(state);
};
});

View File

@ -194,7 +194,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
};
$scope.cancel = function() {
$modalInstance.close();
$modalInstance.dismiss('cancel');
};
};