Fix UI calculator. Set default status bar color if no wallet selected

This commit is contained in:
Gustavo Maximiliano Cortez 2016-08-10 12:08:39 -03:00
commit 9982bef8df
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
9 changed files with 55 additions and 9 deletions

View file

@ -1,7 +1,11 @@
'use strict';
angular.module('copayApp.controllers').controller('amazonController',
function($scope, $timeout, $ionicModal, $log, lodash, bwcError, amazonService) {
function($scope, $timeout, $ionicModal, $log, lodash, bwcError, amazonService, platformInfo) {
if (platformInfo.isCordova && StatusBar.isVisible) {
StatusBar.backgroundColorByHexString("#4B6178");
}
this.init = function() {
var self = this;

View file

@ -5,6 +5,10 @@ angular.module('copayApp.controllers').controller('coinbaseController',
var isNW = platformInfo.isNW;
if (platformInfo.isCordova && StatusBar.isVisible) {
StatusBar.backgroundColorByHexString("#4B6178");
}
this.openAuthenticateWindow = function() {
var oauthUrl = this.getAuthenticateUrl();
if (!isNW) {

View file

@ -1,7 +1,11 @@
'use strict';
angular.module('copayApp.controllers').controller('glideraController',
function($rootScope, $scope, $timeout, $ionicModal, profileService, configService, storageService, glideraService, lodash, ongoingProcess) {
function($rootScope, $scope, $timeout, $ionicModal, profileService, configService, storageService, glideraService, lodash, ongoingProcess, platformInfo) {
if (platformInfo.isCordova && StatusBar.isVisible) {
StatusBar.backgroundColorByHexString("#4B6178");
}
this.getAuthenticateUrl = function() {
return glideraService.getOauthCodeUrl();

View file

@ -19,7 +19,7 @@ angular.module('copayApp.controllers').controller('inputAmountController', funct
satToUnit = 1 / unitToSatoshi;
satToBtc = 1 / 100000000;
unitDecimals = config.unitDecimals;
$scope.resetAmount();
processAmount($scope.amount);
$timeout(function() {
$ionicScrollDelegate.resize();
}, 100);

View file

@ -5,6 +5,10 @@ angular.module('copayApp.controllers').controller('preferencesGlobalController',
var isCordova = platformInfo.isCordova;
if (isCordova && StatusBar.isVisible) {
StatusBar.backgroundColorByHexString("#4B6178");
}
$scope.init = function() {
var config = configService.getSync();
$scope.unitName = config.wallet.settings.unitName;

View file

@ -106,6 +106,11 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
$rootScope.shouldHideMenuBar = false;
});
if (platformInfo.isCordova && StatusBar.isVisible) {
var fc = profileService.focusedClient;
StatusBar.backgroundColorByHexString(fc.backgroundColor);
}
this.onQrCodeScanned = function(data) {
if (data) go.send();
$rootScope.$emit('dataScanned', data);
@ -586,6 +591,11 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
var fc = profileService.focusedClient;
$scope.color = fc.backgroundColor;
$scope.showAlternativeAmount = $scope.showAlternative || null;
if ($scope.showAlternativeAmount) {
$scope.amount = $scope.sendForm.alternative.$viewValue || null;
} else {
$scope.amount = $scope.sendForm.amount.$viewValue || null;
}
$scope.self = self;
$scope.addr = addr;