Merge pull request #4517 from gabrielbazan7/feat/BlackColor
black color easter egg
This commit is contained in:
commit
463fa9cae8
2 changed files with 24 additions and 2 deletions
|
|
@ -15,7 +15,7 @@
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="line-b p20 oh">
|
<li class="line-b p20 oh" ng-click="saveBlack()">
|
||||||
<span translate>Wallet Name (at creation)</span>
|
<span translate>Wallet Name (at creation)</span>
|
||||||
<span class="right text-gray">
|
<span class="right text-gray">
|
||||||
{{walletName}}
|
{{walletName}}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,14 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('preferencesInformation',
|
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 base = 'xpub';
|
||||||
var fc = profileService.focusedClient;
|
var fc = profileService.focusedClient;
|
||||||
var c = fc.credentials;
|
var c = fc.credentials;
|
||||||
|
var walletId = c.walletId;
|
||||||
|
var config = configService.getSync();
|
||||||
|
var b = 1;
|
||||||
|
config.colorFor = config.colorFor || {};
|
||||||
|
|
||||||
$scope.init = function() {
|
$scope.init = function() {
|
||||||
var basePath = c.getBaseAddressDerivationPath();
|
var basePath = c.getBaseAddressDerivationPath();
|
||||||
|
|
@ -89,4 +93,22 @@ angular.module('copayApp.controllers').controller('preferencesInformation',
|
||||||
}, 100);
|
}, 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');
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue