diff options
Diffstat (limited to 'client/src/app/+admin/follows/followers-list/followers-list.component.ts')
-rw-r--r-- | client/src/app/+admin/follows/followers-list/followers-list.component.ts | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/client/src/app/+admin/follows/followers-list/followers-list.component.ts b/client/src/app/+admin/follows/followers-list/followers-list.component.ts index 63135f898..904e3c338 100644 --- a/client/src/app/+admin/follows/followers-list/followers-list.component.ts +++ b/client/src/app/+admin/follows/followers-list/followers-list.component.ts | |||
@@ -2,7 +2,6 @@ import { SortMeta } from 'primeng/api' | |||
2 | import { Component, OnInit } from '@angular/core' | 2 | import { Component, OnInit } from '@angular/core' |
3 | import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' | 3 | import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' |
4 | import { InstanceFollowService } from '@app/shared/shared-instance' | 4 | import { InstanceFollowService } from '@app/shared/shared-instance' |
5 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
6 | import { ActorFollow } from '@shared/models' | 5 | import { ActorFollow } from '@shared/models' |
7 | 6 | ||
8 | @Component({ | 7 | @Component({ |
@@ -19,7 +18,6 @@ export class FollowersListComponent extends RestTable implements OnInit { | |||
19 | constructor ( | 18 | constructor ( |
20 | private confirmService: ConfirmService, | 19 | private confirmService: ConfirmService, |
21 | private notifier: Notifier, | 20 | private notifier: Notifier, |
22 | private i18n: I18n, | ||
23 | private followService: InstanceFollowService | 21 | private followService: InstanceFollowService |
24 | ) { | 22 | ) { |
25 | super() | 23 | super() |
@@ -40,7 +38,7 @@ export class FollowersListComponent extends RestTable implements OnInit { | |||
40 | .subscribe( | 38 | .subscribe( |
41 | () => { | 39 | () => { |
42 | const handle = follow.follower.name + '@' + follow.follower.host | 40 | const handle = follow.follower.name + '@' + follow.follower.host |
43 | this.notifier.success(this.i18n('{{handle}} accepted in instance followers', { handle })) | 41 | this.notifier.success($localize`${handle} accepted in instance followers`) |
44 | }, | 42 | }, |
45 | 43 | ||
46 | err => { | 44 | err => { |
@@ -51,15 +49,15 @@ export class FollowersListComponent extends RestTable implements OnInit { | |||
51 | } | 49 | } |
52 | 50 | ||
53 | async rejectFollower (follow: ActorFollow) { | 51 | async rejectFollower (follow: ActorFollow) { |
54 | const message = this.i18n('Do you really want to reject this follower?') | 52 | const message = $localize`Do you really want to reject this follower?` |
55 | const res = await this.confirmService.confirm(message, this.i18n('Reject')) | 53 | const res = await this.confirmService.confirm(message, $localize`Reject`) |
56 | if (res === false) return | 54 | if (res === false) return |
57 | 55 | ||
58 | this.followService.rejectFollower(follow) | 56 | this.followService.rejectFollower(follow) |
59 | .subscribe( | 57 | .subscribe( |
60 | () => { | 58 | () => { |
61 | const handle = follow.follower.name + '@' + follow.follower.host | 59 | const handle = follow.follower.name + '@' + follow.follower.host |
62 | this.notifier.success(this.i18n('{{handle}} rejected from instance followers', { handle })) | 60 | this.notifier.success($localize`${handle} rejected from instance followers`) |
63 | 61 | ||
64 | this.loadData() | 62 | this.loadData() |
65 | }, | 63 | }, |
@@ -72,15 +70,15 @@ export class FollowersListComponent extends RestTable implements OnInit { | |||
72 | } | 70 | } |
73 | 71 | ||
74 | async deleteFollower (follow: ActorFollow) { | 72 | async deleteFollower (follow: ActorFollow) { |
75 | const message = this.i18n('Do you really want to delete this follower?') | 73 | const message = $localize`Do you really want to delete this follower?` |
76 | const res = await this.confirmService.confirm(message, this.i18n('Delete')) | 74 | const res = await this.confirmService.confirm(message, $localize`Delete`) |
77 | if (res === false) return | 75 | if (res === false) return |
78 | 76 | ||
79 | this.followService.removeFollower(follow) | 77 | this.followService.removeFollower(follow) |
80 | .subscribe( | 78 | .subscribe( |
81 | () => { | 79 | () => { |
82 | const handle = follow.follower.name + '@' + follow.follower.host | 80 | const handle = follow.follower.name + '@' + follow.follower.host |
83 | this.notifier.success(this.i18n('{{handle}} removed from instance followers', { handle })) | 81 | this.notifier.success($localize`${handle} removed from instance followers`) |
84 | 82 | ||
85 | this.loadData() | 83 | this.loadData() |
86 | }, | 84 | }, |