Uses object for level options

This commit is contained in:
Gustavo Maximiliano Cortez 2015-07-30 15:26:16 -03:00
parent 7c69e86771
commit 458a17e0be
No known key found for this signature in database
GPG Key ID: 15EDAD8D9F2EB1AF
4 changed files with 9 additions and 9 deletions

View File

@ -81,7 +81,7 @@
<span translate>Bitcoin Network Fee Policy</span>
<span class="right text-gray">
<i class="icon-arrow-right3 size-24 right"></i>
<span class="text-capitalize">{{index.currentFeeLevel|translate}}</span>
<span class="text-capitalize">{{index.feeOpts[index.currentFeeLevel]|translate}}</span>
</span>
</li>
<li class="line-b p20" ng-click="$root.go('preferencesBwsUrl')">

View File

@ -7,7 +7,7 @@
<ul class="no-bullet m0 size-14">
<li ng-repeat="fee in (index.network == 'livenet' ? index.feeLevels.livenet : index.feeLevels.testnet)"
ng-click="prefFee.save(fee.level)" class="line-b p20">
<span class="text-capitalize">{{fee.level|translate}}</span>
<span class="text-capitalize">{{index.feeOpts[fee.level]|translate}}</span>
<i class="fi-check size-16 right" ng-show="index.currentFeeLevel == fee.level"></i>
</li>
</ul>

View File

@ -10,12 +10,10 @@ angular.module('copayApp.controllers').controller('indexController', function($r
return (parseFloat(number.toPrecision(12)));
};
self.goHome = function() {
go.walletHome();
};
self.menu = [{
'title': gettext('Home'),
'icon': 'icon-home',
@ -66,6 +64,8 @@ angular.module('copayApp.controllers').controller('indexController', function($r
isoCode: 'ja',
}];
self.feeOpts = feeService.feeOpts;
self.setOngoingProcess = function(processName, isOn) {
$log.debug('onGoingProcess', processName, isOn);
self[processName] = isOn;

View File

@ -4,11 +4,11 @@ angular.module('copayApp.services').factory('feeService', function($log, profile
var root = {};
// Constant fee options to translate
var feeOpts = [
gettextCatalog.getString('priority'),
gettextCatalog.getString('normal'),
gettextCatalog.getString('economy')
];
root.feeOpts = {
priority: gettextCatalog.getString('Priority'),
normal: gettextCatalog.getString('Normal'),
economy: gettextCatalog.getString('Economy')
};
root.getCurrentFeeValue = function(cb) {
var fc = profileService.focusedClient;