mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 02:50:00 +08:00
DEV: Invite page changes (#15175)
This commit is contained in:
parent
7456a59022
commit
9ecf454074
|
@ -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
|
||||
|
|
|
@ -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}}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -29,7 +29,10 @@
|
|||
|
||||
li {
|
||||
border-bottom: none;
|
||||
|
||||
&:hover,
|
||||
&.active {
|
||||
background: var(--primary-very-low);
|
||||
}
|
||||
&.archive {
|
||||
padding-left: 1.4em;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user