Merge pull request #4671 from cmgustavo/bug/ui-calc-statusbar-mobile

Fix UI calculator. Set default status bar color if no wallet selected
This commit is contained in:
Matias Alejo Garcia 2016-08-10 12:57:38 -03:00 committed by GitHub
commit 75924a23b5
9 changed files with 55 additions and 9 deletions

View File

@ -425,7 +425,6 @@
readonly="true"
ng-show="!showAlternative"
id="amount"
ng-disabled="home.lockAmount"
name="amount"
ng-attr-placeholder="{{'Amount in'|translate}} {{home.unitName}}"
ng-model="_amount"
@ -439,7 +438,6 @@
readonly="true"
ng-show="showAlternative"
id="alternative"
ng-disabled="!home.isRateAvailable || home.lockAmount"
name="alternative"
ng-attr-placeholder="{{'Amount in'|translate}} {{ home.alternativeName }}"
ng-model="_alternative"

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 (isCordova && StatusBar.isVisible) {
var backgroundColor = profileService.focusedClient ? profileService.focusedClient.backgroundColor : "#4B6178";
StatusBar.backgroundColorByHexString(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;

View File

@ -311,8 +311,13 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
needProfile: true,
views: {
'main': {
templateUrl: 'views/buyAndSell.html'
},
templateUrl: 'views/buyAndSell.html',
controller: function(platformInfo) {
if (platformInfo.isCordova && StatusBar.isVisible) {
StatusBar.backgroundColorByHexString("#4B6178");
}
}
}
}
})
.state('amazon', {
@ -523,8 +528,13 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
needProfile: true,
views: {
'main': {
templateUrl: 'views/add.html'
},
templateUrl: 'views/add.html',
controller: function(platformInfo) {
if (platformInfo.isCordova && StatusBar.isVisible) {
StatusBar.backgroundColorByHexString("#4B6178");
}
}
}
}
});
})

View File

@ -2128,6 +2128,10 @@ body.modal-open {
}
}
/*
* Calculator
*/
.calculator .header-calc {
position: absolute;
width: 100%;
@ -2162,6 +2166,14 @@ body.modal-open {
background-color: #f8f8f8;
}
// No looks likes locked
input[type="number"] {
&[readonly] {
background-color: #F6F7F9;
padding-left: 0;
}
}
@media all and (max-height: 480px) {
.calculator .button-calc .columns { padding: 10px; }
.calculator .header-calc { top: 11%; }