Bug fixes

This commit is contained in:
Gustavo Maximiliano Cortez 2015-04-22 02:48:00 -03:00
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, ng-class="{'main': index.hasProfile, 'main-dark': mainDark, 'animation-left': index.swipeLeft,
'animation-right': index.swipeRight}" 'animation-right': index.swipeRight}"
ui-view="main"></section> 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> <a class="close-menu" ng-click="index.closeMenu()"></a>
</div> </div>

View file

@ -5,7 +5,9 @@
</div> </div>
<div class="dr-notification-content"> <div class="dr-notification-content">
<h3 class="dr-notification-title">Wallet Service Error</h3> <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> </div>
</div> </div>

View file

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

View file

@ -11,7 +11,7 @@
</section> </section>
</nav> </nav>
<div class="p45t" ng-init="updateCopayerList()"> <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"> <ul class="no-bullet size-14 m0">
<li class="line-b p10"> <li class="line-b p10">
<span class="text-gray">To:</span> <span class="text-gray">To:</span>
@ -85,22 +85,10 @@
</div> </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 The transaction was removed by creator
</div> </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 class="row m20t" ng-if="tx.pendingForUs"> <div class="row m20t" ng-if="tx.pendingForUs">
<div class="large-5 medium-5 small-6 columns"> <div class="large-5 medium-5 small-6 columns">
<button class="button outline dark-gray m0 expand" ng-click="reject(tx);" <button class="button outline dark-gray m0 expand" ng-click="reject(tx);"
@ -142,5 +130,17 @@
Transaction finally rejected Transaction finally rejected
</div> </div>
</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>
<div class="extra-margin-bottom"></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 class="receive" ng-controller="receiveController as receive" ng-init="receive.getAddress()">
<div ng-show="index.needsBackup && !receive.skipBackup" class="p60t row text-center"> <div ng-show="index.needsBackup && !receive.skipBackup" class="p60t row text-center">
<div class="text-warning text-bold m15b"> <div class="text-warning text-bold m15b">
<i class="fi-alert"></i> <i class="fi-alert"></i>
<span translate> <span translate>
WARNING: Backup needed WARNING: Backup needed
</span> </span>
</div> </div>
<div class="text-gray m15h" translate> <div class="text-gray m15h" translate>
Before receiving funds, it is highly recommended you backup your wallet keys. Before receiving funds, it is highly recommended you backup your wallet keys.
</div> </div>
<div class="small-6 columns m20t"> <div class="small-6 columns m20t">
<span class="button expand outline dark-gray tiny" <span class="button expand outline dark-gray tiny"
ng-click="receive.skipBackup = true"> ng-click="receive.skipBackup = true">
<span translate>SKIP BACKUP</span> <span translate>SKIP BACKUP</span>
</span> </span>
</div> </div>
<div class="small-6 columns m20t"> <div class="small-6 columns m20t">
<span class="button black expand radius tiny" <span class="button black expand radius tiny"
ng-click="$root.go('backup')" ng-style="{'background-color':index.backgroundColor}" > ng-click="$root.go('backup')" ng-style="{'background-color':index.backgroundColor}" >
<span translate>Backup now</span> <span translate>Backup now</span>
</span> </span>
</div>
</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> </div>
</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--> <!-- Address-->
<div class="large-12 columns"> <div class="large-12 columns">
<h2 class="text-center m10t" translate>My Bitcoin address:</h2> <h2 class="text-center m10t" translate>My Bitcoin address</h2>
<div class="text-center" ng-click="receive.copyAddress(receive.addr)"> <div class="text-center animated fadeIn" ng-click="receive.copyAddress(receive.addr)">
<qrcode size="220" data="bitcoin:{{receive.addr}}"></qrcode> <qrcode size="220" data="bitcoin:{{receive.addr}}"></qrcode>
<div class="m10t"> <div class="m10t">
<h4 ng-class="{'enable_text_select': !index.isCordova}" class="size-12">{{receive.addr}}</h4> <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="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> </div>
<div class="row m20t" ng-show="receive.addr"> <div class="row m20t" ng-if="receive.addr">
<div class="large-12 columns"> <div class="large-12 columns">
<a class="button black expand radius" ng-click="receive.newAddress()" <button class="button black expand radius" ng-click="receive.newAddress()"
ng-style="{'background-color':index.backgroundColor}" translate> ng-style="{'background-color':index.backgroundColor}" ng-disabled="receive.generatingAddress" translate>
Generate new address Generate new address
</a> </button>
</div> </div>
</div> </div>
</div> </div>
</div>
</div> </div>

View file

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

View file

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

View file

@ -6,12 +6,28 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.onGoingProcess = {}; self.onGoingProcess = {};
self.limitHistory = 5; self.limitHistory = 5;
self.hideMenuBar = false;
function strip(number) { function strip(number) {
return (parseFloat(number.toPrecision(12))); 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) { self.setOngoingProcess = function(processName, isOn) {
$log.debug('onGoingProcess', processName, isOn); $log.debug('onGoingProcess', processName, isOn);
self[processName] = isOn; self[processName] = isOn;
@ -193,6 +209,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.openWallet = function() { self.openWallet = function() {
var fc = profileService.focusedClient; var fc = profileService.focusedClient;
self.updateColor(); self.updateColor();
$rootScope.$apply();
$timeout(function() { $timeout(function() {
self.setOngoingProcess('openingWallet', true); self.setOngoingProcess('openingWallet', true);
self.updateError = false; 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() { $scope.cancel = function() {
$modalInstance.close(); $modalInstance.dismiss('cancel');
}; };
}; };