notify when email was re-send
This commit is contained in:
parent
ef8fb60812
commit
188a0d348c
2 changed files with 18 additions and 7 deletions
|
|
@ -51,7 +51,12 @@
|
||||||
|
|
||||||
<span class="status" ng-if="$root.needsEmailConfirmation && !$root.pleaseConfirmEmailAck">
|
<span class="status" ng-if="$root.needsEmailConfirmation && !$root.pleaseConfirmEmailAck">
|
||||||
<a class="close-notification text-white" ng-click="$root.pleaseConfirmEmailAck=true">×</a>
|
<a class="close-notification text-white" ng-click="$root.pleaseConfirmEmailAck=true">×</a>
|
||||||
<a class="text-white button warning tiny m0 right" ng-click="resendVerificationEmail()">Resend</a>
|
<button class="text-white warning tiny m0 right"
|
||||||
|
ng-click="resendVerificationEmail()"
|
||||||
|
ng-disabled="loading"
|
||||||
|
ng-show="!hideReSendButton">
|
||||||
|
{{ loading ? 'Resending...' : 'Resend' }}
|
||||||
|
</button>
|
||||||
<i class="fi-alert size-36 left m20r"></i>
|
<i class="fi-alert size-36 left m20r"></i>
|
||||||
<span translate>
|
<span translate>
|
||||||
<strong class="size-16">Email not confirmed</strong>.<br>
|
<strong class="size-16">Email not confirmed</strong>.<br>
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,25 @@
|
||||||
'use strict';
|
'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.init = function() {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.resendVerificationEmail = function() {
|
$scope.resendVerificationEmail = function() {
|
||||||
|
$scope.loading = true;
|
||||||
identityService.resendVerificationEmail(function(err) {
|
identityService.resendVerificationEmail(function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
notification.error('Could not send email', 'There was a problem sending the verification email.');
|
notification.error('Could not send email', 'There was a problem sending the verification email.');
|
||||||
setTimeout(function() {
|
|
||||||
$scope.$digest();
|
|
||||||
}, 1);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
notification.success('Email sent', 'Check your inbox and confirms the email');
|
||||||
|
$scope.hideReSendButton = true;
|
||||||
|
}
|
||||||
|
$scope.loading = null;
|
||||||
|
$timeout(function() {
|
||||||
|
$scope.$digest();
|
||||||
|
}, 1);
|
||||||
|
return;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue