+ activateCopiedMessage () {
+ this.notifier.success($localize`Username copied`)
+ }
+
+ subscribersDisplayFor (count: number) {
+ if (count === 1) return $localize`1 subscriber`
+
+ return $localize`${count} subscribers`
+ }
+
+ private onAccount (account: Account) {
+ this.prependModerationActions = undefined
+
+ this.account = account
+
+ if (this.authService.isLoggedIn()) {
+ this.authService.userInformationLoaded.subscribe(
+ () => {
+ this.isAccountManageable = this.account.userId && this.account.userId === this.authService.getUser().id
+
+ const followers = this.subscribersDisplayFor(account.followersCount)
+ this.accountFollowerTitle = $localize`${followers} direct account followers`
+
+ // It's not our account, we can report it
+ if (!this.isAccountManageable) {
+ this.prependModerationActions = [
+ {
+ label: $localize`Report this account`,
+ handler: () => this.showReportModal()
+ }
+ ]
+ }
+ }
+ )
+ }
+
+ this.getUserIfNeeded(account)
+ }
+
+ private showReportModal () {
+ this.accountReportModal.show()
+ }
+