diff --git a/public/views/preferencesEmail.html b/public/views/preferencesEmail.html new file mode 100644 index 000000000..dac07f5e9 --- /dev/null +++ b/public/views/preferencesEmail.html @@ -0,0 +1,39 @@ +
+
+ + + +
+ +
+
+
+
+
+
+
+
+
+ Saving preferences... +
+
+ + +
+
+ + {{prefEmail.error|translate}} + +
+ + + + +
+

Setting up email notifications could weaken your privacy, if the wallet service provider is compromised. Information available to an attacker would include be the positive confirmation of a bitcoin wallet and its balance, but no more. +

+
diff --git a/src/js/controllers/preferencesEmail.js b/src/js/controllers/preferencesEmail.js new file mode 100644 index 000000000..140c41cd0 --- /dev/null +++ b/src/js/controllers/preferencesEmail.js @@ -0,0 +1,28 @@ +'use strict'; + +angular.module('copayApp.controllers').controller('preferencesEmailController', + function($scope, go, profileService ,gettext, $log) { + this.save = function(form) { + this.error=null; + + if (!form.$valid) { + this.error = gettext('Invalid email'); + return; + } + +console.log('[preferencesEmail.js.12]', this.email); //TODO + var fc = profileService.focusedClient; + this.saving =true; + fc.savePreferences({email:this.email}, function(err) { + fc.saving =false; + if (err) { + $log.warn(err); + $scope.$emit('Local/ClientError', err); + return; + } + go.walletHome(); + }); + }; + + + });