From 9f5d09f1cca7b8edeeab5c0c66c8638c2952561a Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Wed, 13 May 2015 12:41:05 -0300 Subject: [PATCH] fix colors --- public/views/includes/topbar.html | 2 +- public/views/preferences.html | 7 ++++--- public/views/walletHome.html | 6 +++++- src/css/mobile.css | 2 +- src/js/controllers/preferences.js | 5 ++++- src/js/controllers/preferencesColor.js | 2 +- src/js/controllers/walletHome.js | 3 +++ 7 files changed, 19 insertions(+), 8 deletions(-) diff --git a/public/views/includes/topbar.html b/public/views/includes/topbar.html index 8ec5880ca..4be35bfbc 100644 --- a/public/views/includes/topbar.html +++ b/public/views/includes/topbar.html @@ -20,7 +20,7 @@
-

+

{{(titleSection|translate) || index.walletName}}

diff --git a/public/views/preferences.html b/public/views/preferences.html index 523ef6b7e..d40d26613 100644 --- a/public/views/preferences.html +++ b/public/views/preferences.html @@ -8,14 +8,14 @@
-
+ +
+ +
@@ -457,4 +461,4 @@
-
+
diff --git a/src/css/mobile.css b/src/css/mobile.css index e1929ad2d..f4fab59a6 100644 --- a/src/css/mobile.css +++ b/src/css/mobile.css @@ -97,7 +97,7 @@ _:-ms-fullscreen, :root .main { } .tab-bar h1 { - color: #1ABC9C; + color: #7A8C9E; font-weight: 500; font-size: 14px; } diff --git a/src/js/controllers/preferences.js b/src/js/controllers/preferences.js index ba63e4225..742db5a84 100644 --- a/src/js/controllers/preferences.js +++ b/src/js/controllers/preferences.js @@ -10,10 +10,13 @@ angular.module('copayApp.controllers').controller('preferencesController', isoCode: config.wallet.settings.alternativeIsoCode }; var fc = profileService.focusedClient; - $scope.encrypt = fc.hasPrivKeyEncrypted(); + if (fc) + $scope.encrypt = fc.hasPrivKeyEncrypted(); var unwatch = $scope.$watch('encrypt', function(val) { var fc = profileService.focusedClient; + if (!fc) return; + if (val && !fc.hasPrivKeyEncrypted()) { $rootScope.$emit('Local/NeedsPassword', true, function(err, password) { if (err || !password) { diff --git a/src/js/controllers/preferencesColor.js b/src/js/controllers/preferencesColor.js index d6e7fe823..d01a878fb 100644 --- a/src/js/controllers/preferencesColor.js +++ b/src/js/controllers/preferencesColor.js @@ -4,6 +4,7 @@ angular.module('copayApp.controllers').controller('preferencesColorController', function($scope, configService, profileService, go) { var config = configService.getSync(); this.colorOpts = [ + '#7A8C9E', '#F38F12', '#F4D03F', '#4A90E2', @@ -11,7 +12,6 @@ angular.module('copayApp.controllers').controller('preferencesColorController', '#9B59B6', '#E856EF', '#F883B4', - '#7A8C9E', ]; var fc = profileService.focusedClient; diff --git a/src/js/controllers/walletHome.js b/src/js/controllers/walletHome.js index cf35c0bb3..1f9894080 100644 --- a/src/js/controllers/walletHome.js +++ b/src/js/controllers/walletHome.js @@ -356,6 +356,9 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi return; var fc = profileService.focusedClient; + if (!fc) + return; + $timeout(function() { storageService.getLastAddress(fc.credentials.walletId, function(err, addr) { if (addr) {