mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #6380 from gabrielbazan7/fix/statusBar
fix status bar color for android devices
This commit is contained in:
commit
79a78d9937
|
@ -2,6 +2,7 @@
|
|||
"packageName": "bitpay",
|
||||
"packageDescription": "Secure Bitcoin Wallet",
|
||||
"packageNameId": "com.bitpay.wallet",
|
||||
"statusBarColor": "#1e3186",
|
||||
"userVisibleName": "BitPay",
|
||||
"purposeLine": "Secure Bitcoin Wallet",
|
||||
"bundleName": "wallet",
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<preference name="WindowsStoreDisplayName" value="*WINDOWSSTOREDISPLAYNAME*"/>
|
||||
|
||||
<!-- <preference name="KeyboardDisplayRequiresUserAction" value="false" /> -->
|
||||
<preference name="StatusBarBackgroundColor" value="#1e3186" />
|
||||
<preference name="StatusBarBackgroundColor" value="*STATUSBARCOLOR*" />
|
||||
<preference name="BackupWebStorage" value="none"/>
|
||||
<preference name="windows-target-version" value="10.0"/>
|
||||
<preference name="Orientation" value="default" />
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
"packageName": "copay",
|
||||
"packageDescription": "Copay Bitcoin Wallet",
|
||||
"packageNameId": "com.bitpay.copay",
|
||||
"statusBarColor": "#192c3a",
|
||||
"userVisibleName": "Copay",
|
||||
"purposeLine": "Copay Bitcoin Wallet",
|
||||
"bundleName": "copay",
|
||||
|
|
|
@ -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) {
|
||||
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) {
|
||||
|
||||
var HISTORY_SHOW_LIMIT = 10;
|
||||
var currentTxHistoryPage = 0;
|
||||
|
@ -52,9 +52,9 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
var analyzeUtxos = function() {
|
||||
if (analyzeUtxosDone) return;
|
||||
|
||||
feeService.getFeeLevels(function(err, levels){
|
||||
feeService.getFeeLevels(function(err, levels) {
|
||||
if (err) return;
|
||||
walletService.getLowUtxos($scope.wallet, levels, function(err, resp){
|
||||
walletService.getLowUtxos($scope.wallet, levels, function(err, resp) {
|
||||
if (err || !resp) return;
|
||||
analyzeUtxosDone = true;
|
||||
$scope.lowUtxosWarning = resp.warning;
|
||||
|
@ -171,7 +171,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
});
|
||||
};
|
||||
|
||||
feeService.getFeeLevels(function(err, levels){
|
||||
feeService.getFeeLevels(function(err, levels) {
|
||||
walletService.getTxHistory($scope.wallet, {
|
||||
progressFn: progressFn,
|
||||
feeLevels: levels,
|
||||
|
@ -378,9 +378,11 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
refreshAmountSection();
|
||||
});
|
||||
|
||||
$scope.$on("$ionicView.beforeLeave", function(event, data) {
|
||||
$scope.$on("$ionicView.afterLeave", function(event, data) {
|
||||
|
||||
if ($window.StatusBar) {
|
||||
$window.StatusBar.backgroundColorByHexString('#1e3186');
|
||||
var statusBarColor = appConfigService.name == 'copay' ? '#192c3a' : '#1e3186';
|
||||
$window.StatusBar.backgroundColorByHexString(statusBarColor);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -392,7 +394,10 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
|
||||
function setAndroidStatusBarColor() {
|
||||
var SUBTRACT_AMOUNT = 15;
|
||||
var rgb = hexToRgb($scope.wallet.color);
|
||||
var walletColor;
|
||||
if (!$scope.wallet.color) walletColor = appConfigService.name == 'copay' ? '#019477' : '#4a90e2';
|
||||
else walletColor = $scope.wallet.color;
|
||||
var rgb = hexToRgb(walletColor);
|
||||
var keys = Object.keys(rgb);
|
||||
keys.forEach(function(k) {
|
||||
if (rgb[k] - SUBTRACT_AMOUNT < 0) {
|
||||
|
|
|
@ -43,8 +43,8 @@ $v-wallet-color-map: (
|
|||
13: (color: #7a8c9e, name: 'Light Slate Grey')
|
||||
) !default;
|
||||
|
||||
/* Theme */
|
||||
$v-default-wallet-color-index: 6 !default; // See $v-wallet-color-map
|
||||
/* Theme */
|
||||
$v-default-wallet-color-index: 8 !default; // See $v-wallet-color-map
|
||||
$v-subtle-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25) !default;
|
||||
$v-hovering-box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.3) !default;
|
||||
$v-subtle-radius: 3px !default;
|
||||
|
|
Loading…
Reference in New Issue