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:
commit
75924a23b5
9 changed files with 55 additions and 9 deletions
|
|
@ -425,7 +425,6 @@
|
||||||
readonly="true"
|
readonly="true"
|
||||||
ng-show="!showAlternative"
|
ng-show="!showAlternative"
|
||||||
id="amount"
|
id="amount"
|
||||||
ng-disabled="home.lockAmount"
|
|
||||||
name="amount"
|
name="amount"
|
||||||
ng-attr-placeholder="{{'Amount in'|translate}} {{home.unitName}}"
|
ng-attr-placeholder="{{'Amount in'|translate}} {{home.unitName}}"
|
||||||
ng-model="_amount"
|
ng-model="_amount"
|
||||||
|
|
@ -439,7 +438,6 @@
|
||||||
readonly="true"
|
readonly="true"
|
||||||
ng-show="showAlternative"
|
ng-show="showAlternative"
|
||||||
id="alternative"
|
id="alternative"
|
||||||
ng-disabled="!home.isRateAvailable || home.lockAmount"
|
|
||||||
name="alternative"
|
name="alternative"
|
||||||
ng-attr-placeholder="{{'Amount in'|translate}} {{ home.alternativeName }}"
|
ng-attr-placeholder="{{'Amount in'|translate}} {{ home.alternativeName }}"
|
||||||
ng-model="_alternative"
|
ng-model="_alternative"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,11 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('amazonController',
|
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() {
|
this.init = function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,10 @@ angular.module('copayApp.controllers').controller('coinbaseController',
|
||||||
|
|
||||||
var isNW = platformInfo.isNW;
|
var isNW = platformInfo.isNW;
|
||||||
|
|
||||||
|
if (platformInfo.isCordova && StatusBar.isVisible) {
|
||||||
|
StatusBar.backgroundColorByHexString("#4B6178");
|
||||||
|
}
|
||||||
|
|
||||||
this.openAuthenticateWindow = function() {
|
this.openAuthenticateWindow = function() {
|
||||||
var oauthUrl = this.getAuthenticateUrl();
|
var oauthUrl = this.getAuthenticateUrl();
|
||||||
if (!isNW) {
|
if (!isNW) {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,11 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('glideraController',
|
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() {
|
this.getAuthenticateUrl = function() {
|
||||||
return glideraService.getOauthCodeUrl();
|
return glideraService.getOauthCodeUrl();
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ angular.module('copayApp.controllers').controller('inputAmountController', funct
|
||||||
satToUnit = 1 / unitToSatoshi;
|
satToUnit = 1 / unitToSatoshi;
|
||||||
satToBtc = 1 / 100000000;
|
satToBtc = 1 / 100000000;
|
||||||
unitDecimals = config.unitDecimals;
|
unitDecimals = config.unitDecimals;
|
||||||
$scope.resetAmount();
|
processAmount($scope.amount);
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$ionicScrollDelegate.resize();
|
$ionicScrollDelegate.resize();
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,10 @@ angular.module('copayApp.controllers').controller('preferencesGlobalController',
|
||||||
|
|
||||||
var isCordova = platformInfo.isCordova;
|
var isCordova = platformInfo.isCordova;
|
||||||
|
|
||||||
|
if (isCordova && StatusBar.isVisible) {
|
||||||
|
StatusBar.backgroundColorByHexString("#4B6178");
|
||||||
|
}
|
||||||
|
|
||||||
$scope.init = function() {
|
$scope.init = function() {
|
||||||
var config = configService.getSync();
|
var config = configService.getSync();
|
||||||
$scope.unitName = config.wallet.settings.unitName;
|
$scope.unitName = config.wallet.settings.unitName;
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,11 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
||||||
$rootScope.shouldHideMenuBar = false;
|
$rootScope.shouldHideMenuBar = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (isCordova && StatusBar.isVisible) {
|
||||||
|
var backgroundColor = profileService.focusedClient ? profileService.focusedClient.backgroundColor : "#4B6178";
|
||||||
|
StatusBar.backgroundColorByHexString(backgroundColor);
|
||||||
|
}
|
||||||
|
|
||||||
this.onQrCodeScanned = function(data) {
|
this.onQrCodeScanned = function(data) {
|
||||||
if (data) go.send();
|
if (data) go.send();
|
||||||
$rootScope.$emit('dataScanned', data);
|
$rootScope.$emit('dataScanned', data);
|
||||||
|
|
@ -586,6 +591,11 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
||||||
var fc = profileService.focusedClient;
|
var fc = profileService.focusedClient;
|
||||||
$scope.color = fc.backgroundColor;
|
$scope.color = fc.backgroundColor;
|
||||||
$scope.showAlternativeAmount = $scope.showAlternative || null;
|
$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.self = self;
|
||||||
$scope.addr = addr;
|
$scope.addr = addr;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -311,8 +311,13 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
needProfile: true,
|
needProfile: true,
|
||||||
views: {
|
views: {
|
||||||
'main': {
|
'main': {
|
||||||
templateUrl: 'views/buyAndSell.html'
|
templateUrl: 'views/buyAndSell.html',
|
||||||
},
|
controller: function(platformInfo) {
|
||||||
|
if (platformInfo.isCordova && StatusBar.isVisible) {
|
||||||
|
StatusBar.backgroundColorByHexString("#4B6178");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.state('amazon', {
|
.state('amazon', {
|
||||||
|
|
@ -523,8 +528,13 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
needProfile: true,
|
needProfile: true,
|
||||||
views: {
|
views: {
|
||||||
'main': {
|
'main': {
|
||||||
templateUrl: 'views/add.html'
|
templateUrl: 'views/add.html',
|
||||||
},
|
controller: function(platformInfo) {
|
||||||
|
if (platformInfo.isCordova && StatusBar.isVisible) {
|
||||||
|
StatusBar.backgroundColorByHexString("#4B6178");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -2128,6 +2128,10 @@ body.modal-open {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Calculator
|
||||||
|
*/
|
||||||
|
|
||||||
.calculator .header-calc {
|
.calculator .header-calc {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
@ -2162,6 +2166,14 @@ body.modal-open {
|
||||||
background-color: #f8f8f8;
|
background-color: #f8f8f8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// No looks likes locked
|
||||||
|
input[type="number"] {
|
||||||
|
&[readonly] {
|
||||||
|
background-color: #F6F7F9;
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media all and (max-height: 480px) {
|
@media all and (max-height: 480px) {
|
||||||
.calculator .button-calc .columns { padding: 10px; }
|
.calculator .button-calc .columns { padding: 10px; }
|
||||||
.calculator .header-calc { top: 11%; }
|
.calculator .header-calc { top: 11%; }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue