From 5b81a1ba9b29f97c335e445d1c6829f4f6f41e29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Wed, 29 Jun 2016 15:59:58 -0300 Subject: [PATCH] black color easter egg --- public/views/preferencesInformation.html | 2 +- src/js/controllers/preferencesInformation.js | 24 +++++++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/public/views/preferencesInformation.html b/public/views/preferencesInformation.html index 8d568cfbc..1556e2df9 100644 --- a/public/views/preferencesInformation.html +++ b/public/views/preferencesInformation.html @@ -15,7 +15,7 @@ -
  • +
  • Wallet Name (at creation) {{walletName}} diff --git a/src/js/controllers/preferencesInformation.js b/src/js/controllers/preferencesInformation.js index 6edfa4df1..69d165023 100644 --- a/src/js/controllers/preferencesInformation.js +++ b/src/js/controllers/preferencesInformation.js @@ -1,10 +1,14 @@ 'use strict'; angular.module('copayApp.controllers').controller('preferencesInformation', - function($scope, $log, $timeout, platformInfo, gettextCatalog, lodash, profileService, storageService, go, bitcore) { + function($scope, $log, $timeout, platformInfo, gettextCatalog, lodash, profileService, storageService, configService, go, bitcore) { var base = 'xpub'; var fc = profileService.focusedClient; var c = fc.credentials; + var walletId = c.walletId; + var config = configService.getSync(); + var b = 1; + config.colorFor = config.colorFor || {}; $scope.init = function() { var basePath = c.getBaseAddressDerivationPath(); @@ -89,4 +93,22 @@ angular.module('copayApp.controllers').controller('preferencesInformation', }, 100); }; + $scope.saveBlack = function() { + function save(color) { + var opts = { + colorFor: {} + }; + opts.colorFor[walletId] = color; + + configService.set(opts, function(err) { + go.walletHome(); + if (err) $log.warn(err); + $scope.$emit('Local/ColorUpdated'); + }); + }; + + if (b != 5) return b++; + save('#202020'); + } + });