-
Benoit Lavenier authored
[fix] TX history: read sending as pending TX, and not as written TX [enh] Wallet & Wot TX: better amount unit management
Benoit Lavenier authored[fix] TX history: read sending as pending TX, and not as written TX [enh] Wallet & Wot TX: better amount unit management
settings-controllers.js 9.61 KiB
angular.module('cesium.settings.controllers', ['cesium.services', 'cesium.currency.controllers'])
.config(function($stateProvider) {
'ngInject';
$stateProvider
.state('app.settings', {
url: "/settings",
views: {
'menuContent': {
templateUrl: "templates/settings/settings.html",
controller: 'SettingsCtrl'
}
}
})
;
})
.controller('SettingsCtrl', SettingsController)
;
function SettingsController($scope, $q, $ionicHistory, $ionicPopup, $timeout, $translate, csHttp,
UIUtils, BMA, csSettings, csPlatform, $ionicPopover, Modals) {
'ngInject';
$scope.formData = angular.copy(csSettings.data);
$scope.popupData = {}; // need for the node popup
$scope.loading = true;
$scope.nodePopup = {};
$scope.bma = BMA;
$scope.keepAuthIdleLabels = {
/*0: {
labelKey: 'SETTINGS.KEEP_AUTH_OPTION.NEVER'
},*/
10: {
labelKey: 'SETTINGS.KEEP_AUTH_OPTION.SECONDS',
labelParams: {value: 10}
},
30: {
labelKey: 'SETTINGS.KEEP_AUTH_OPTION.SECONDS',
labelParams: {value: 30}
},
60: {
labelKey: 'SETTINGS.KEEP_AUTH_OPTION.MINUTE',
labelParams: {value: 1}
},
600: {
labelKey: 'SETTINGS.KEEP_AUTH_OPTION.MINUTES',
labelParams: {value: 10}
},
3600: {
labelKey: 'SETTINGS.KEEP_AUTH_OPTION.HOUR',
labelParams: {value: 1}
},
9999: {
labelKey: 'SETTINGS.KEEP_AUTH_OPTION.ALWAYS'
}
};
$scope.keepAuthIdles = _.keys($scope.keepAuthIdleLabels);
$scope.$on('$ionicView.enter', function() {
csSettings.ready().then($scope.load);
});
$scope.setPopupForm = function(popupForm) {
$scope.popupForm = popupForm;
};