diff --git a/src/js/controllers/preferencesEmail.js b/src/js/controllers/preferencesEmail.js index e4a339ce5..c865c67dc 100644 --- a/src/js/controllers/preferencesEmail.js +++ b/src/js/controllers/preferencesEmail.js @@ -2,23 +2,25 @@ angular.module('copayApp.controllers').controller('preferencesEmailController', function($scope, $ionicHistory, $stateParams, gettextCatalog, profileService, walletService, configService) { - var wallet = profileService.getWallet($stateParams.walletId); - var walletId = wallet.credentials.walletId; + $scope.wallet = profileService.getWallet($stateParams.walletId); + var walletId = $scope.wallet.credentials.walletId; var config = configService.getSync(); config.emailFor = config.emailFor || {}; + $scope.emailForExist = config.emailFor && config.emailFor[walletId]; $scope.email = { value: config.emailFor && config.emailFor[walletId] }; - $scope.save = function() { + + $scope.save = function(val) { var opts = { emailFor: {} }; - opts.emailFor[walletId] = $scope.email.value; + opts.emailFor[walletId] = val; - walletService.updateRemotePreferences(wallet, { - email: $scope.email.value, + walletService.updateRemotePreferences($scope.wallet, { + email: val, }, function(err) { if (err) $log.warn(err); configService.set(opts, function(err) { diff --git a/src/sass/views/tab-settings.scss b/src/sass/views/tab-settings.scss index 5c93e1c02..f28f773bf 100644 --- a/src/sass/views/tab-settings.scss +++ b/src/sass/views/tab-settings.scss @@ -17,6 +17,10 @@ color: $mid-gray; margin: 1rem 0; } + &-description-disabled { + color: cadetblue; + text-decoration: none; + } .setting-title, .setting-value { display: block; overflow: hidden; diff --git a/www/views/preferencesEmail.html b/www/views/preferencesEmail.html index 06c02aaa1..fc7ba9a85 100644 --- a/www/views/preferencesEmail.html +++ b/www/views/preferencesEmail.html @@ -9,10 +9,11 @@
- You'll receive email notifications about payments sent and received from this wallet. + You'll receive email notifications about payments sent and received from {{wallet.name}}.
+ Remove email notifications
-
+