aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/moderation/user-moderation-dropdown.component.ts
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/shared/moderation/user-moderation-dropdown.component.ts
parentc78d3db71baa397971a83b110c0159169646eae4 (diff)
downloadPeerTube-9b82d49da868536701d80ef1071df0e7cd301b7a.tar.gz
PeerTube-9b82d49da868536701d80ef1071df0e7cd301b7a.tar.zst
PeerTube-9b82d49da868536701d80ef1071df0e7cd301b7a.zip
Add action dropdown descriptions
Diffstat (limited to 'client/src/app/shared/moderation/user-moderation-dropdown.component.ts')
-rw-r--r--client/src/app/shared/moderation/user-moderation-dropdown.component.ts18
1 files changed, 15 insertions, 3 deletions
diff --git a/client/src/app/shared/moderation/user-moderation-dropdown.component.ts b/client/src/app/shared/moderation/user-moderation-dropdown.component.ts
index 89f275a04..7ae5f40e3 100644
--- a/client/src/app/shared/moderation/user-moderation-dropdown.component.ts
+++ b/client/src/app/shared/moderation/user-moderation-dropdown.component.ts
@@ -243,20 +243,24 @@ export class UserModerationDropdownComponent implements OnInit, OnChanges {
243 if (this.user && authUser.hasRight(UserRight.MANAGE_USERS) && authUser.canManage(this.user)) { 243 if (this.user && authUser.hasRight(UserRight.MANAGE_USERS) && authUser.canManage(this.user)) {
244 this.userActions.push([ 244 this.userActions.push([
245 { 245 {
246 label: this.i18n('Edit user'), 246 label: this.i18n('Edit'),
247 description: this.i18n('Change quota, role, and more.'),
247 linkBuilder: ({ user }) => this.getRouterUserEditLink(user) 248 linkBuilder: ({ user }) => this.getRouterUserEditLink(user)
248 }, 249 },
249 { 250 {
250 label: this.i18n('Delete user'), 251 label: this.i18n('Delete'),
252 description: this.i18n('Videos will be deleted, comments will be tombstoned.'),
251 handler: ({ user }) => this.removeUser(user) 253 handler: ({ user }) => this.removeUser(user)
252 }, 254 },
253 { 255 {
254 label: this.i18n('Ban user'), 256 label: this.i18n('Ban'),
257 description: this.i18n('Videos will be kept as private, comments will be kept as is.'),
255 handler: ({ user }) => this.openBanUserModal(user), 258 handler: ({ user }) => this.openBanUserModal(user),
256 isDisplayed: ({ user }) => !user.blocked 259 isDisplayed: ({ user }) => !user.blocked
257 }, 260 },
258 { 261 {
259 label: this.i18n('Unban user'), 262 label: this.i18n('Unban user'),
263 description: this.i18n('Allow the user to login and create videos/comments again'),
260 handler: ({ user }) => this.unbanUser(user), 264 handler: ({ user }) => this.unbanUser(user),
261 isDisplayed: ({ user }) => user.blocked 265 isDisplayed: ({ user }) => user.blocked
262 }, 266 },
@@ -274,21 +278,25 @@ export class UserModerationDropdownComponent implements OnInit, OnChanges {
274 this.userActions.push([ 278 this.userActions.push([
275 { 279 {
276 label: this.i18n('Mute this account'), 280 label: this.i18n('Mute this account'),
281 description: this.i18n('Hide any content from that user for you.'),
277 isDisplayed: ({ account }) => account.mutedByUser === false, 282 isDisplayed: ({ account }) => account.mutedByUser === false,
278 handler: ({ account }) => this.blockAccountByUser(account) 283 handler: ({ account }) => this.blockAccountByUser(account)
279 }, 284 },
280 { 285 {
281 label: this.i18n('Unmute this account'), 286 label: this.i18n('Unmute this account'),
287 description: this.i18n('Show back content from that user for you.'),
282 isDisplayed: ({ account }) => account.mutedByUser === true, 288 isDisplayed: ({ account }) => account.mutedByUser === true,
283 handler: ({ account }) => this.unblockAccountByUser(account) 289 handler: ({ account }) => this.unblockAccountByUser(account)
284 }, 290 },
285 { 291 {
286 label: this.i18n('Mute the instance'), 292 label: this.i18n('Mute the instance'),
293 description: this.i18n('Hide any content from that instance for you.'),
287 isDisplayed: ({ account }) => !account.userId && account.mutedServerByInstance === false, 294 isDisplayed: ({ account }) => !account.userId && account.mutedServerByInstance === false,
288 handler: ({ account }) => this.blockServerByUser(account.host) 295 handler: ({ account }) => this.blockServerByUser(account.host)
289 }, 296 },
290 { 297 {
291 label: this.i18n('Unmute the instance'), 298 label: this.i18n('Unmute the instance'),
299 description: this.i18n('Show back content from that instance for you.'),
292 isDisplayed: ({ account }) => !account.userId && account.mutedServerByInstance === true, 300 isDisplayed: ({ account }) => !account.userId && account.mutedServerByInstance === true,
293 handler: ({ account }) => this.unblockServerByUser(account.host) 301 handler: ({ account }) => this.unblockServerByUser(account.host)
294 } 302 }
@@ -301,11 +309,13 @@ export class UserModerationDropdownComponent implements OnInit, OnChanges {
301 instanceActions = instanceActions.concat([ 309 instanceActions = instanceActions.concat([
302 { 310 {
303 label: this.i18n('Mute this account by your instance'), 311 label: this.i18n('Mute this account by your instance'),
312 description: this.i18n('Hide any content from that user for you, your instance and its users.'),
304 isDisplayed: ({ account }) => account.mutedByInstance === false, 313 isDisplayed: ({ account }) => account.mutedByInstance === false,
305 handler: ({ account }) => this.blockAccountByInstance(account) 314 handler: ({ account }) => this.blockAccountByInstance(account)
306 }, 315 },
307 { 316 {
308 label: this.i18n('Unmute this account by your instance'), 317 label: this.i18n('Unmute this account by your instance'),
318 description: this.i18n('Show back content from that user for you, your instance and its users.'),
309 isDisplayed: ({ account }) => account.mutedByInstance === true, 319 isDisplayed: ({ account }) => account.mutedByInstance === true,
310 handler: ({ account }) => this.unblockAccountByInstance(account) 320 handler: ({ account }) => this.unblockAccountByInstance(account)
311 } 321 }
@@ -317,11 +327,13 @@ export class UserModerationDropdownComponent implements OnInit, OnChanges {
317 instanceActions = instanceActions.concat([ 327 instanceActions = instanceActions.concat([
318 { 328 {
319 label: this.i18n('Mute the instance by your instance'), 329 label: this.i18n('Mute the instance by your instance'),
330 description: this.i18n('Hide any content from that instance for you, your instance and its users.'),
320 isDisplayed: ({ account }) => !account.userId && account.mutedServerByInstance === false, 331 isDisplayed: ({ account }) => !account.userId && account.mutedServerByInstance === false,
321 handler: ({ account }) => this.blockServerByInstance(account.host) 332 handler: ({ account }) => this.blockServerByInstance(account.host)
322 }, 333 },
323 { 334 {
324 label: this.i18n('Unmute the instance by your instance'), 335 label: this.i18n('Unmute the instance by your instance'),
336 description: this.i18n('Show back content from that instance for you, your instance and its users.'),
325 isDisplayed: ({ account }) => !account.userId && account.mutedServerByInstance === true, 337 isDisplayed: ({ account }) => !account.userId && account.mutedServerByInstance === true,
326 handler: ({ account }) => this.unblockServerByInstance(account.host) 338 handler: ({ account }) => this.unblockServerByInstance(account.host)
327 } 339 }