aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/users
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-01-15 19:25:51 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-01-21 11:59:41 +0100
commit9b82d49da868536701d80ef1071df0e7cd301b7a (patch)
treed34997edf0157d390f44d367f6fd795e0d681760 /client/src/app/+admin/users
parentc78d3db71baa397971a83b110c0159169646eae4 (diff)
downloadPeerTube-9b82d49da868536701d80ef1071df0e7cd301b7a.tar.gz
PeerTube-9b82d49da868536701d80ef1071df0e7cd301b7a.tar.zst
PeerTube-9b82d49da868536701d80ef1071df0e7cd301b7a.zip
Add action dropdown descriptions
Diffstat (limited to 'client/src/app/+admin/users')
-rw-r--r--client/src/app/+admin/users/user-list/user-list.component.html4
-rw-r--r--client/src/app/+admin/users/user-list/user-list.component.ts52
2 files changed, 31 insertions, 25 deletions
diff --git a/client/src/app/+admin/users/user-list/user-list.component.html b/client/src/app/+admin/users/user-list/user-list.component.html
index 885335313..ca05bac19 100644
--- a/client/src/app/+admin/users/user-list/user-list.component.html
+++ b/client/src/app/+admin/users/user-list/user-list.component.html
@@ -66,7 +66,7 @@
66 </a> 66 </a>
67 </td> 67 </td>
68 68
69 <td *ngIf="!requiresEmailVerification || user.blocked; else emailWithVerificationStatus">{{ user.email }}</td> 69 <td *ngIf="!requiresEmailVerification || user.blocked; else emailWithVerificationStatus" [title]="user.email">{{ user.email }}</td>
70 70
71 <ng-template #emailWithVerificationStatus> 71 <ng-template #emailWithVerificationStatus>
72 <td *ngIf="user.emailVerified === false; else emailVerifiedNotFalse" i18n-title title="User's email must be verified to login"> 72 <td *ngIf="user.emailVerified === false; else emailVerifiedNotFalse" i18n-title title="User's email must be verified to login">
@@ -81,7 +81,7 @@
81 81
82 <td>{{ user.videoQuotaUsed }} / {{ user.videoQuota }}</td> 82 <td>{{ user.videoQuotaUsed }} / {{ user.videoQuota }}</td>
83 <td>{{ user.roleLabel }}</td> 83 <td>{{ user.roleLabel }}</td>
84 <td>{{ user.createdAt }}</td> 84 <td [title]="user.createdAt">{{ user.createdAt }}</td>
85 <td class="action-cell"> 85 <td class="action-cell">
86 <my-user-moderation-dropdown *ngIf="!isInSelectionMode()" [user]="user" (userChanged)="onUserChanged()" (userDeleted)="onUserChanged()"> 86 <my-user-moderation-dropdown *ngIf="!isInSelectionMode()" [user]="user" (userChanged)="onUserChanged()" (userDeleted)="onUserChanged()">
87 </my-user-moderation-dropdown> 87 </my-user-moderation-dropdown>
diff --git a/client/src/app/+admin/users/user-list/user-list.component.ts b/client/src/app/+admin/users/user-list/user-list.component.ts
index 1083ba291..a596251f6 100644
--- a/client/src/app/+admin/users/user-list/user-list.component.ts
+++ b/client/src/app/+admin/users/user-list/user-list.component.ts
@@ -23,7 +23,7 @@ export class UserListComponent extends RestTable implements OnInit {
23 pagination: RestPagination = { count: this.rowsPerPage, start: 0 } 23 pagination: RestPagination = { count: this.rowsPerPage, start: 0 }
24 24
25 selectedUsers: User[] = [] 25 selectedUsers: User[] = []
26 bulkUserActions: DropdownAction<User[]>[] = [] 26 bulkUserActions: DropdownAction<User[]>[][] = []
27 27
28 private serverConfig: ServerConfig 28 private serverConfig: ServerConfig
29 29
@@ -54,29 +54,35 @@ export class UserListComponent extends RestTable implements OnInit {
54 this.initialize() 54 this.initialize()
55 55
56 this.bulkUserActions = [ 56 this.bulkUserActions = [
57 { 57 [
58 label: this.i18n('Delete'), 58 {
59 handler: users => this.removeUsers(users), 59 label: this.i18n('Delete'),
60 isDisplayed: users => users.every(u => this.authUser.canManage(u)) 60 description: this.i18n('Videos will be deleted, comments will be tombstoned.'),
61 }, 61 handler: users => this.removeUsers(users),
62 { 62 isDisplayed: users => users.every(u => this.authUser.canManage(u))
63 label: this.i18n('Ban'), 63 },
64 handler: users => this.openBanUserModal(users), 64 {
65 isDisplayed: users => users.every(u => this.authUser.canManage(u) && u.blocked === false) 65 label: this.i18n('Ban'),
66 }, 66 description: this.i18n('Videos will be kept as private, comments will be kept as is.'),
67 { 67 handler: users => this.openBanUserModal(users),
68 label: this.i18n('Unban'), 68 isDisplayed: users => users.every(u => this.authUser.canManage(u) && u.blocked === false)
69 handler: users => this.unbanUsers(users), 69 },
70 isDisplayed: users => users.every(u => this.authUser.canManage(u) && u.blocked === true) 70 {
71 }, 71 label: this.i18n('Unban'),
72 { 72 handler: users => this.unbanUsers(users),
73 label: this.i18n('Set Email as Verified'), 73 isDisplayed: users => users.every(u => this.authUser.canManage(u) && u.blocked === true)
74 handler: users => this.setEmailsAsVerified(users),
75 isDisplayed: users => {
76 return this.requiresEmailVerification &&
77 users.every(u => this.authUser.canManage(u) && !u.blocked && u.emailVerified === false)
78 } 74 }
79 } 75 ],
76 [
77 {
78 label: this.i18n('Set Email as Verified'),
79 handler: users => this.setEmailsAsVerified(users),
80 isDisplayed: users => {
81 return this.requiresEmailVerification &&
82 users.every(u => this.authUser.canManage(u) && !u.blocked && u.emailVerified === false)
83 }
84 }
85 ]
80 ] 86 ]
81 } 87 }
82 88