X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2F%2Baccounts%2Faccounts.component.ts;h=8983254928339990c8f76a43073809501580f636;hb=d9f9804d8642b11001cb75aaef597e12825abe21;hp=0dcbc250ab14df9e719e0b6b3d1453e4cf6a480d;hpb=6e14e40053961cf0b2f55710847f21a3e1b5b627;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/+accounts/accounts.component.ts b/client/src/app/+accounts/accounts.component.ts index 0dcbc250a..898325492 100644 --- a/client/src/app/+accounts/accounts.component.ts +++ b/client/src/app/+accounts/accounts.component.ts @@ -12,7 +12,7 @@ import { VideoChannelService, VideoService } from '@app/shared/shared-main' -import { AccountReportComponent } from '@app/shared/shared-moderation' +import { AccountReportComponent, BlocklistService } from '@app/shared/shared-moderation' import { HttpStatusCode, User, UserRight } from '@shared/models' @Component({ @@ -52,6 +52,7 @@ export class AccountsComponent implements OnInit, OnDestroy { private authService: AuthService, private videoService: VideoService, private markdown: MarkdownService, + private blocklist: BlocklistService, private screenService: ScreenService ) { } @@ -159,6 +160,7 @@ export class AccountsComponent implements OnInit, OnDestroy { this.updateModerationActions() this.loadUserIfNeeded(account) this.loadAccountVideosCount() + this.loadAccountBlockStatus() } private showReportModal () { @@ -217,4 +219,9 @@ export class AccountsComponent implements OnInit, OnDestroy { this.accountVideosCount = res.total }) } + + private loadAccountBlockStatus () { + this.blocklist.getStatus({ accounts: [ this.account.nameWithHostForced ], hosts: [ this.account.host ] }) + .subscribe(status => this.account.updateBlockStatus(status)) + } }