-import { OnInit, ViewChild, Directive } from '@angular/core'
-import { BatchDomainsModalComponent } from '@app/shared/shared-moderation/batch-domains-modal.component'
+import { Directive, OnInit, ViewChild } from '@angular/core'
import { ServerBlock } from '@shared/models'
import { BlocklistComponentType, BlocklistService } from './blocklist.service'
@Directive()
import { ServerBlock } from '@shared/models'
import { BlocklistComponentType, BlocklistService } from './blocklist.service'
@Directive()
export class GenericServerBlocklistComponent extends RestTable implements OnInit {
@ViewChild('batchDomainsModal') batchDomainsModal: BatchDomainsModalComponent
export class GenericServerBlocklistComponent extends RestTable implements OnInit {
@ViewChild('batchDomainsModal') batchDomainsModal: BatchDomainsModalComponent
unblockServer (serverBlock: ServerBlock) {
const operation = (host: string) => this.mode === BlocklistComponentType.Account
unblockServer (serverBlock: ServerBlock) {
const operation = (host: string) => this.mode === BlocklistComponentType.Account
- ? this.blocklistService.unblockServerByUser(host)
- : this.blocklistService.unblockServerByInstance(host)
+ ? this.blocklistService.unblockServerByUser(host)
+ : this.blocklistService.unblockServerByInstance(host)
const host = serverBlock.blockedServer.host
operation(host).subscribe(
() => {
this.notifier.success(
this.mode === BlocklistComponentType.Account
const host = serverBlock.blockedServer.host
operation(host).subscribe(
() => {
this.notifier.success(
this.mode === BlocklistComponentType.Account
- ? this.i18n('Instance {{host}} unmuted.', { host })
- : this.i18n('Instance {{host}} unmuted by your instance.', { host })
+ ? $localize`Instance ${host} unmuted.`
+ : $localize`Instance ${host} unmuted by your instance.`
- ? this.i18n('Instance {{domain}} muted.', { domain })
- : this.i18n('Instance {{domain}} muted by your instance.', { domain })
+ ? $localize`Instance ${domain} muted.`
+ : $localize`Instance ${domain} muted by your instance.`
const operation = this.mode === BlocklistComponentType.Account
? this.blocklistService.getUserServerBlocklist({
pagination: this.pagination,
const operation = this.mode === BlocklistComponentType.Account
? this.blocklistService.getUserServerBlocklist({
pagination: this.pagination,