aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared')
-rw-r--r--client/src/app/shared/moderation/user-moderation-dropdown.component.ts44
1 files changed, 22 insertions, 22 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 d391246e0..e3c9db923 100644
--- a/client/src/app/shared/moderation/user-moderation-dropdown.component.ts
+++ b/client/src/app/shared/moderation/user-moderation-dropdown.component.ts
@@ -277,18 +277,18 @@ export class UserModerationDropdownComponent implements OnChanges {
277 }, 277 },
278 { 278 {
279 label: this.i18n('Ban'), 279 label: this.i18n('Ban'),
280 handler: ({ user }: { user: User }) => this.openBanUserModal(user), 280 handler: ({ user }) => this.openBanUserModal(user),
281 isDisplayed: ({ user }: { user: User }) => !user.blocked 281 isDisplayed: ({ user }) => !user.blocked
282 }, 282 },
283 { 283 {
284 label: this.i18n('Unban'), 284 label: this.i18n('Unban'),
285 handler: ({ user }: { user: User }) => this.unbanUser(user), 285 handler: ({ user }) => this.unbanUser(user),
286 isDisplayed: ({ user }: { user: User }) => user.blocked 286 isDisplayed: ({ user }) => user.blocked
287 }, 287 },
288 { 288 {
289 label: this.i18n('Set Email as Verified'), 289 label: this.i18n('Set Email as Verified'),
290 handler: ({ user }: { user: User }) => this.setEmailAsVerified(user), 290 handler: ({ user }) => this.setEmailAsVerified(user),
291 isDisplayed: ({ user }: { user: User }) => this.requiresEmailVerification && !user.blocked && user.emailVerified === false 291 isDisplayed: ({ user }) => this.requiresEmailVerification && !user.blocked && user.emailVerified === false
292 } 292 }
293 ]) 293 ])
294 } 294 }
@@ -299,23 +299,23 @@ export class UserModerationDropdownComponent implements OnChanges {
299 this.userActions.push([ 299 this.userActions.push([
300 { 300 {
301 label: this.i18n('Mute this account'), 301 label: this.i18n('Mute this account'),
302 isDisplayed: ({ account }: { account: Account }) => account.mutedByUser === false, 302 isDisplayed: ({ account }) => account.mutedByUser === false,
303 handler: ({ account }: { account: Account }) => this.blockAccountByUser(account) 303 handler: ({ account }) => this.blockAccountByUser(account)
304 }, 304 },
305 { 305 {
306 label: this.i18n('Unmute this account'), 306 label: this.i18n('Unmute this account'),
307 isDisplayed: ({ account }: { account: Account }) => account.mutedByUser === true, 307 isDisplayed: ({ account }) => account.mutedByUser === true,
308 handler: ({ account }: { account: Account }) => this.unblockAccountByUser(account) 308 handler: ({ account }) => this.unblockAccountByUser(account)
309 }, 309 },
310 { 310 {
311 label: this.i18n('Mute the instance'), 311 label: this.i18n('Mute the instance'),
312 isDisplayed: ({ account }: { account: Account }) => !account.userId && account.mutedServerByInstance === false, 312 isDisplayed: ({ account }) => !account.userId && account.mutedServerByInstance === false,
313 handler: ({ account }: { account: Account }) => this.blockServerByUser(account.host) 313 handler: ({ account }) => this.blockServerByUser(account.host)
314 }, 314 },
315 { 315 {
316 label: this.i18n('Unmute the instance'), 316 label: this.i18n('Unmute the instance'),
317 isDisplayed: ({ account }: { account: Account }) => !account.userId && account.mutedServerByInstance === true, 317 isDisplayed: ({ account }) => !account.userId && account.mutedServerByInstance === true,
318 handler: ({ account }: { account: Account }) => this.unblockServerByUser(account.host) 318 handler: ({ account }) => this.unblockServerByUser(account.host)
319 } 319 }
320 ]) 320 ])
321 321
@@ -326,13 +326,13 @@ export class UserModerationDropdownComponent implements OnChanges {
326 instanceActions = instanceActions.concat([ 326 instanceActions = instanceActions.concat([
327 { 327 {
328 label: this.i18n('Mute this account by your instance'), 328 label: this.i18n('Mute this account by your instance'),
329 isDisplayed: ({ account }: { account: Account }) => account.mutedByInstance === false, 329 isDisplayed: ({ account }) => account.mutedByInstance === false,
330 handler: ({ account }: { account: Account }) => this.blockAccountByInstance(account) 330 handler: ({ account }) => this.blockAccountByInstance(account)
331 }, 331 },
332 { 332 {
333 label: this.i18n('Unmute this account by your instance'), 333 label: this.i18n('Unmute this account by your instance'),
334 isDisplayed: ({ account }: { account: Account }) => account.mutedByInstance === true, 334 isDisplayed: ({ account }) => account.mutedByInstance === true,
335 handler: ({ account }: { account: Account }) => this.unblockAccountByInstance(account) 335 handler: ({ account }) => this.unblockAccountByInstance(account)
336 } 336 }
337 ]) 337 ])
338 } 338 }
@@ -342,13 +342,13 @@ export class UserModerationDropdownComponent implements OnChanges {
342 instanceActions = instanceActions.concat([ 342 instanceActions = instanceActions.concat([
343 { 343 {
344 label: this.i18n('Mute the instance by your instance'), 344 label: this.i18n('Mute the instance by your instance'),
345 isDisplayed: ({ account }: { account: Account }) => !account.userId && account.mutedServerByInstance === false, 345 isDisplayed: ({ account }) => !account.userId && account.mutedServerByInstance === false,
346 handler: ({ account }: { account: Account }) => this.blockServerByInstance(account.host) 346 handler: ({ account }) => this.blockServerByInstance(account.host)
347 }, 347 },
348 { 348 {
349 label: this.i18n('Unmute the instance by your instance'), 349 label: this.i18n('Unmute the instance by your instance'),
350 isDisplayed: ({ account }: { account: Account }) => !account.userId && account.mutedServerByInstance === true, 350 isDisplayed: ({ account }) => !account.userId && account.mutedServerByInstance === true,
351 handler: ({ account }: { account: Account }) => this.unblockServerByInstance(account.host) 351 handler: ({ account }) => this.unblockServerByInstance(account.host)
352 } 352 }
353 ]) 353 ])
354 } 354 }