DEV: Invite page changes (#15175)

This commit is contained in:
Jordan Vidrine 2021-12-02 13:18:11 -06:00 committed by GitHub
parent 7456a59022
commit 9ecf454074
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 11 deletions

View File

@ -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

View File

@ -17,9 +17,9 @@
{{#if showBulkActionButtons}}
{{#if inviteExpired}}
{{#if removedAll}}
<li>
<span class="removed-all">
{{i18n "user.invited.removed_all"}}
</li>
</span>
{{else}}
{{d-button icon="times" action=(action "destroyAllExpired") label="user.invited.remove_all"}}
{{/if}}
@ -27,10 +27,10 @@
{{#if invitePending}}
{{#if reinvitedAll}}
<li>
{{i18n "user.invited.reinvited_all"}}
</li>
{{else}}
<span class="reinvited-all">
{{d-button icon="check" disabled=true label="user.invited.reinvited_all"}}
</span>
{{else if hasEmailInvites}}
{{d-button class="btn-default" icon="sync" action=(action "reinviteAll") label="user.invited.reinvite_all"}}
{{/if}}
{{/if}}

View File

@ -7,7 +7,7 @@
display: grid;
grid-template-columns: 1fr 5fr;
grid-template-rows: auto auto 1fr auto;
grid-row-gap: 20px;
grid-gap: 20px;
.user-primary-navigation {
grid-column-start: 1;
grid-column-end: 3;

View File

@ -29,7 +29,10 @@
li {
border-bottom: none;
&:hover,
&.active {
background: var(--primary-very-low);
}
&.archive {
padding-left: 1.4em;
}