diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-01-15 19:25:51 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-01-21 11:59:41 +0100 |
commit | 9b82d49da868536701d80ef1071df0e7cd301b7a (patch) | |
tree | d34997edf0157d390f44d367f6fd795e0d681760 /client/src/app/+admin | |
parent | c78d3db71baa397971a83b110c0159169646eae4 (diff) | |
download | PeerTube-9b82d49da868536701d80ef1071df0e7cd301b7a.tar.gz PeerTube-9b82d49da868536701d80ef1071df0e7cd301b7a.tar.zst PeerTube-9b82d49da868536701d80ef1071df0e7cd301b7a.zip |
Add action dropdown descriptions
Diffstat (limited to 'client/src/app/+admin')
3 files changed, 37 insertions, 31 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html index e5340234b..915d60090 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html | |||
@@ -118,7 +118,7 @@ | |||
118 | 118 | ||
119 | <div class="form-group"> | 119 | <div class="form-group"> |
120 | <label i18n for="instanceModerationInformation">Moderation information</label><my-help helpType="markdownText"></my-help> | 120 | <label i18n for="instanceModerationInformation">Moderation information</label><my-help helpType="markdownText"></my-help> |
121 | <div class="label-small-info">Who moderates the instance? What is the policy regarding NSFW videos? Political videos? etc</div> | 121 | <div i18n class="label-small-info">Who moderates the instance? What is the policy regarding NSFW videos? Political videos? etc</div> |
122 | 122 | ||
123 | <my-markdown-textarea | 123 | <my-markdown-textarea |
124 | name="instanceModerationInformation" formControlName="moderationInformation" textareaWidth="500px" [previewColumn]="true" | 124 | name="instanceModerationInformation" formControlName="moderationInformation" textareaWidth="500px" [previewColumn]="true" |
@@ -131,7 +131,7 @@ | |||
131 | 131 | ||
132 | <div class="form-group"> | 132 | <div class="form-group"> |
133 | <label i18n for="instanceAdministrator">Who is behind the instance?</label> | 133 | <label i18n for="instanceAdministrator">Who is behind the instance?</label> |
134 | <div class="label-small-info">A single person? A non-profit? A company?</div> | 134 | <div i18n class="label-small-info">A single person? A non-profit? A company?</div> |
135 | 135 | ||
136 | <my-markdown-textarea | 136 | <my-markdown-textarea |
137 | name="instanceAdministrator" formControlName="administrator" textareaWidth="500px" textareaHeight="75px" [previewColumn]="true" | 137 | name="instanceAdministrator" formControlName="administrator" textareaWidth="500px" textareaHeight="75px" [previewColumn]="true" |
@@ -143,7 +143,7 @@ | |||
143 | 143 | ||
144 | <div class="form-group"> | 144 | <div class="form-group"> |
145 | <label i18n for="instanceCreationReason">Why did you create this instance?</label> | 145 | <label i18n for="instanceCreationReason">Why did you create this instance?</label> |
146 | <div class="label-small-info">To share your personal videos? To open registrations and allow people to upload what they want?</div> | 146 | <div i18n class="label-small-info">To share your personal videos? To open registrations and allow people to upload what they want?</div> |
147 | 147 | ||
148 | <textarea | 148 | <textarea |
149 | id="instanceCreationReason" formControlName="creationReason" class="small" | 149 | id="instanceCreationReason" formControlName="creationReason" class="small" |
@@ -154,7 +154,7 @@ | |||
154 | 154 | ||
155 | <div class="form-group"> | 155 | <div class="form-group"> |
156 | <label i18n for="instanceMaintenanceLifetime">How long do you plan to maintain this instance?</label> | 156 | <label i18n for="instanceMaintenanceLifetime">How long do you plan to maintain this instance?</label> |
157 | <div class="label-small-info">It's important to know for users who want to register on your instance</div> | 157 | <div i18n class="label-small-info">It's important to know for users who want to register on your instance</div> |
158 | 158 | ||
159 | <textarea | 159 | <textarea |
160 | id="instanceMaintenanceLifetime" formControlName="maintenanceLifetime" class="small" | 160 | id="instanceMaintenanceLifetime" formControlName="maintenanceLifetime" class="small" |
@@ -165,7 +165,7 @@ | |||
165 | 165 | ||
166 | <div class="form-group"> | 166 | <div class="form-group"> |
167 | <label i18n for="instanceBusinessModel">How will you finance the PeerTube server?</label> | 167 | <label i18n for="instanceBusinessModel">How will you finance the PeerTube server?</label> |
168 | <div class="label-small-info">With your own funds? With users donations? Advertising?</div> | 168 | <div i18n class="label-small-info">With your own funds? With users donations? Advertising?</div> |
169 | 169 | ||
170 | <textarea | 170 | <textarea |
171 | id="instanceBusinessModel" formControlName="businessModel" class="small" | 171 | id="instanceBusinessModel" formControlName="businessModel" class="small" |
@@ -178,7 +178,7 @@ | |||
178 | 178 | ||
179 | <div class="form-group"> | 179 | <div class="form-group"> |
180 | <label i18n for="instanceHardwareInformation">What server/hardware does the instance run on?</label> | 180 | <label i18n for="instanceHardwareInformation">What server/hardware does the instance run on?</label> |
181 | <div class="label-small-info">2vCore 2GB RAM/or directly the link to the server you rent etc</div> | 181 | <div i18n class="label-small-info">2vCore 2GB RAM/or directly the link to the server you rent etc</div> |
182 | 182 | ||
183 | <my-markdown-textarea | 183 | <my-markdown-textarea |
184 | name="instanceHardwareInformation" formControlName="hardwareInformation" textareaWidth="500px" textareaHeight="75px" [previewColumn]="true" | 184 | name="instanceHardwareInformation" formControlName="hardwareInformation" textareaWidth="500px" textareaHeight="75px" [previewColumn]="true" |
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 | ||