From 188a0d348c4b9ca6fd02974454826003609bbf0c Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Fri, 19 Dec 2014 16:05:52 -0300 Subject: [PATCH] notify when email was re-send --- index.html | 7 ++++++- js/controllers/index.js | 18 ++++++++++++------ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index ae445c855..272bb3d24 100644 --- a/index.html +++ b/index.html @@ -51,7 +51,12 @@ × - Resend + Email not confirmed.
diff --git a/js/controllers/index.js b/js/controllers/index.js index 8e1f4e689..6362fa1f6 100644 --- a/js/controllers/index.js +++ b/js/controllers/index.js @@ -1,19 +1,25 @@ 'use strict'; -angular.module('copayApp.controllers').controller('IndexController', function($scope, go, isCordova, identityService, notification) { +angular.module('copayApp.controllers').controller('IndexController', function($scope, $timeout, go, isCordova, identityService, notification) { $scope.init = function() { }; $scope.resendVerificationEmail = function() { + $scope.loading = true; identityService.resendVerificationEmail(function(err) { if (err) { - notification.error('Could not send email', 'There was a problem sending the verification email.'); - setTimeout(function() { - $scope.$digest(); - }, 1); - return; + notification.error('Could not send email', 'There was a problem sending the verification email.'); } + else { + notification.success('Email sent', 'Check your inbox and confirms the email'); + $scope.hideReSendButton = true; + } + $scope.loading = null; + $timeout(function() { + $scope.$digest(); + }, 1); + return; }); };