aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/follows/following-list/following-list.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+admin/follows/following-list/following-list.component.ts')
-rw-r--r--client/src/app/+admin/follows/following-list/following-list.component.ts14
1 files changed, 6 insertions, 8 deletions
diff --git a/client/src/app/+admin/follows/following-list/following-list.component.ts b/client/src/app/+admin/follows/following-list/following-list.component.ts
index dae8923b5..5f71f1238 100644
--- a/client/src/app/+admin/follows/following-list/following-list.component.ts
+++ b/client/src/app/+admin/follows/following-list/following-list.component.ts
@@ -3,7 +3,6 @@ import { Component, OnInit, ViewChild } from '@angular/core'
3import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' 3import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core'
4import { InstanceFollowService } from '@app/shared/shared-instance' 4import { InstanceFollowService } from '@app/shared/shared-instance'
5import { BatchDomainsModalComponent } from '@app/shared/shared-moderation' 5import { BatchDomainsModalComponent } from '@app/shared/shared-moderation'
6import { I18n } from '@ngx-translate/i18n-polyfill'
7import { ActorFollow } from '@shared/models' 6import { ActorFollow } from '@shared/models'
8 7
9@Component({ 8@Component({
@@ -22,9 +21,8 @@ export class FollowingListComponent extends RestTable implements OnInit {
22 constructor ( 21 constructor (
23 private notifier: Notifier, 22 private notifier: Notifier,
24 private confirmService: ConfirmService, 23 private confirmService: ConfirmService,
25 private followService: InstanceFollowService, 24 private followService: InstanceFollowService
26 private i18n: I18n 25 ) {
27 ) {
28 super() 26 super()
29 } 27 }
30 28
@@ -47,7 +45,7 @@ export class FollowingListComponent extends RestTable implements OnInit {
47 async addFollowing (hosts: string[]) { 45 async addFollowing (hosts: string[]) {
48 this.followService.follow(hosts).subscribe( 46 this.followService.follow(hosts).subscribe(
49 () => { 47 () => {
50 this.notifier.success(this.i18n('Follow request(s) sent!')) 48 this.notifier.success($localize`Follow request(s) sent!`)
51 this.loadData() 49 this.loadData()
52 }, 50 },
53 51
@@ -57,14 +55,14 @@ export class FollowingListComponent extends RestTable implements OnInit {
57 55
58 async removeFollowing (follow: ActorFollow) { 56 async removeFollowing (follow: ActorFollow) {
59 const res = await this.confirmService.confirm( 57 const res = await this.confirmService.confirm(
60 this.i18n('Do you really want to unfollow {{host}}?', { host: follow.following.host }), 58 $localize`Do you really want to unfollow ${follow.following.host}?`,
61 this.i18n('Unfollow') 59 $localize`Unfollow`
62 ) 60 )
63 if (res === false) return 61 if (res === false) return
64 62
65 this.followService.unfollow(follow).subscribe( 63 this.followService.unfollow(follow).subscribe(
66 () => { 64 () => {
67 this.notifier.success(this.i18n('You are not following {{host}} anymore.', { host: follow.following.host })) 65 this.notifier.success($localize`You are not following ${follow.following.host} anymore.`)
68 this.loadData() 66 this.loadData()
69 }, 67 },
70 68