add restore default buttons
This commit is contained in:
parent
4726570b7a
commit
5113e8b292
2 changed files with 25 additions and 5 deletions
|
|
@ -1,13 +1,10 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('SettingsController', function($scope, $rootScope, $window, $location, controllerUtils, notification) {
|
||||
angular.module('copayApp.controllers').controller('SettingsController', function($scope, $rootScope, $window, $route, $location, $anchorScroll, controllerUtils, notification) {
|
||||
|
||||
|
||||
controllerUtils.redirIfLogged();
|
||||
|
||||
|
||||
|
||||
|
||||
$scope.title = 'Settings';
|
||||
$scope.defaultLanguage = config.defaultLanguage || 'en';
|
||||
$scope.insightLivenet = config.network.livenet.url;
|
||||
|
|
@ -102,4 +99,13 @@ angular.module('copayApp.controllers').controller('SettingsController', function
|
|||
var hashIndex = window.location.href.indexOf('#!/');
|
||||
window.location = window.location.href.substr(0, hashIndex);
|
||||
};
|
||||
|
||||
|
||||
$scope.reset = function() {
|
||||
localStorage.removeItem('config');
|
||||
$location.hash('top');
|
||||
$anchorScroll();
|
||||
$scope.message= 'Settings were reset to defaults';
|
||||
};
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue