send/receive buttons on walletDetails + currencySymbolService
This commit is contained in:
parent
a5a999958c
commit
450b80b03f
6 changed files with 279 additions and 33 deletions
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, $ionicHistory, profileService, lodash, configService, platformInfo, walletService, txpModalService, externalLinkService, popupService, addressbookService, storageService, $ionicScrollDelegate, $window, bwcError, gettextCatalog, timeService, feeService, appConfigService, rateService) {
|
||||
angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, $ionicHistory, profileService, lodash, configService, currencySymbolService, platformInfo, walletService, txpModalService, externalLinkService, popupService, addressbookService, storageService, $ionicScrollDelegate, $window, bwcError, gettextCatalog, timeService, feeService, appConfigService, rateService) {
|
||||
|
||||
var HISTORY_SHOW_LIMIT = 10;
|
||||
var currentTxHistoryPage = 0;
|
||||
|
|
@ -12,6 +12,13 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
$scope.isAndroid = platformInfo.isAndroid;
|
||||
$scope.isIOS = platformInfo.isIOS;
|
||||
|
||||
$scope.currencySymbols = {
|
||||
'EUR': '€',
|
||||
'GBP': '£',
|
||||
'USD': '$',
|
||||
'YEN' : ''
|
||||
};
|
||||
|
||||
var channel = "firebase";
|
||||
if (platformInfo.isNW) {
|
||||
channel = "ga";
|
||||
|
|
@ -256,6 +263,11 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
return !tx.confirmations || tx.confirmations === 0;
|
||||
};
|
||||
|
||||
$scope.currencySymbol = function(code) {
|
||||
var symbol = currencySymbolService.getCurrencySymbol(code);
|
||||
return symbol?symbol:"";
|
||||
};
|
||||
|
||||
$scope.showMore = function() {
|
||||
$timeout(function() {
|
||||
currentTxHistoryPage++;
|
||||
|
|
@ -315,16 +327,16 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
}
|
||||
|
||||
scrollPos = scrollPos || 0;
|
||||
var amountHeight = 210 - scrollPos;
|
||||
var amountHeight = 230 - scrollPos;
|
||||
if (amountHeight < 80) {
|
||||
amountHeight = 80;
|
||||
}
|
||||
var contentMargin = amountHeight;
|
||||
if (contentMargin > 210) {
|
||||
contentMargin = 210;
|
||||
if (contentMargin > 230) {
|
||||
contentMargin = 230;
|
||||
}
|
||||
|
||||
var amountScale = (amountHeight / 210);
|
||||
var amountScale = (amountHeight / 230);
|
||||
if (amountScale < 0.5) {
|
||||
amountScale = 0.5;
|
||||
}
|
||||
|
|
@ -342,7 +354,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
top = TOP_BALANCE_BUTTON;
|
||||
}
|
||||
|
||||
var amountTop = ((amountScale - 0.7) / 0.7) * top;
|
||||
var amountTop = ((amountScale - 0.85) / 0.85) * top;
|
||||
if (amountTop < -10) {
|
||||
amountTop = -10;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue