diff --git a/js/controllers/settings.js b/js/controllers/settings.js index 057f30bef..d84270c38 100644 --- a/js/controllers/settings.js +++ b/js/controllers/settings.js @@ -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'; + }; + }); diff --git a/views/settings.html b/views/settings.html index 89ced4a90..4220cd522 100644 --- a/views/settings.html +++ b/views/settings.html @@ -1,12 +1,19 @@
-
+
Copay

{{title|translate}}

+ +

+ + {{message|translate}} +

+
Language