From 9ecf454074284536831c7c97283245abb3b4afc6 Mon Sep 17 00:00:00 2001 From: Jordan Vidrine <30537603+jordanvidrine@users.noreply.github.com> Date: Thu, 2 Dec 2021 13:18:11 -0600 Subject: [PATCH] DEV: Invite page changes (#15175) --- .../discourse/app/controllers/user-invited-show.js | 13 ++++++++++--- .../discourse/app/templates/user-invited-show.hbs | 12 ++++++------ app/assets/stylesheets/common/base/user.scss | 2 +- app/assets/stylesheets/desktop/user.scss | 5 ++++- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/app/assets/javascripts/discourse/app/controllers/user-invited-show.js b/app/assets/javascripts/discourse/app/controllers/user-invited-show.js index 50c36460c10..866ddebd955 100644 --- a/app/assets/javascripts/discourse/app/controllers/user-invited-show.js +++ b/app/assets/javascripts/discourse/app/controllers/user-invited-show.js @@ -45,6 +45,13 @@ export default Controller.extend({ inviteExpired: equal("filter", "expired"), invitePending: equal("filter", "pending"), + @discourseComputed("model") + hasEmailInvites(model) { + return model.invites.some((invite) => { + return invite.email; + }); + }, + @discourseComputed("filter") showBulkActionButtons(filter) { return ( @@ -57,9 +64,9 @@ export default Controller.extend({ canInviteToForum: reads("currentUser.can_invite_to_forum"), canBulkInvite: reads("currentUser.admin"), - @discourseComputed("invitesCount.total") - showSearch(invitesCountTotal) { - return invitesCountTotal > 0; + @discourseComputed("invitesCount", "filter") + showSearch(invitesCount, filter) { + return invitesCount[filter] > 5; }, @action diff --git a/app/assets/javascripts/discourse/app/templates/user-invited-show.hbs b/app/assets/javascripts/discourse/app/templates/user-invited-show.hbs index a3b616b4770..73eb1be6668 100644 --- a/app/assets/javascripts/discourse/app/templates/user-invited-show.hbs +++ b/app/assets/javascripts/discourse/app/templates/user-invited-show.hbs @@ -17,9 +17,9 @@ {{#if showBulkActionButtons}} {{#if inviteExpired}} {{#if removedAll}} -