diff --git a/core/client/app/components/gh-user-invited.js b/core/client/app/components/gh-user-invited.js index 8aaf83563c..17b90ae959 100644 --- a/core/client/app/components/gh-user-invited.js +++ b/core/client/app/components/gh-user-invited.js @@ -4,6 +4,7 @@ export default Ember.Component.extend({ tagName: '', user: null, + isSending: false, notifications: Ember.inject.service(), @@ -16,8 +17,10 @@ export default Ember.Component.extend({ actions: { resend: function () { var user = this.get('user'), - notifications = this.get('notifications'); + notifications = this.get('notifications'), + self = this; + this.set('isSending', true); user.resendInvite().then(function (result) { var notificationText = 'Invitation resent! (' + user.get('email') + ')'; @@ -31,6 +34,8 @@ export default Ember.Component.extend({ } }).catch(function (error) { notifications.showAPIError(error); + }).finally(function () { + self.set('isSending', false); }); }, diff --git a/core/client/app/controllers/modals/invite-new-user.js b/core/client/app/controllers/modals/invite-new-user.js index 5f8e66f511..ba0870ca0d 100644 --- a/core/client/app/controllers/modals/invite-new-user.js +++ b/core/client/app/controllers/modals/invite-new-user.js @@ -74,7 +74,7 @@ export default Ember.Controller.extend({ if (newUser.get('status') === 'invited-pending') { self.get('notifications').showAlert('Invitation email was not sent. Please try resending.', {type: 'error'}); } else { - self.get('notifications').showAlert(notificationText, {type: 'success'}); + self.get('notifications').showNotification(notificationText); } }).catch(function (errors) { newUser.deleteRecord(); diff --git a/core/client/app/templates/team/index.hbs b/core/client/app/templates/team/index.hbs index 99539c371e..bd517d4e59 100644 --- a/core/client/app/templates/team/index.hbs +++ b/core/client/app/templates/team/index.hbs @@ -37,12 +37,16 @@ {{/if}} {{/gh-user-invited}}