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({
private authService: AuthService,
private videoService: VideoService,
private markdown: MarkdownService,
+ private blocklist: BlocklistService,
private screenService: ScreenService
) {
}
this.updateModerationActions()
this.loadUserIfNeeded(account)
this.loadAccountVideosCount()
+ this.loadAccountBlockStatus()
}
private showReportModal () {
- this.accountReportModal.show()
+ this.accountReportModal.show(this.account)
}
private loadUserIfNeeded (account: Account) {
this.accountVideosCount = res.total
})
}
+
+ private loadAccountBlockStatus () {
+ this.blocklist.getStatus({ accounts: [ this.account.nameWithHostForced ], hosts: [ this.account.host ] })
+ .subscribe(status => this.account.updateBlockStatus(status))
+ }
}