From 2e46eb97154da909b82d5efe1d336a3412594ff0 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 3 May 2021 14:33:34 +0200 Subject: Refactor search filters --- .../follows/followers-list/followers-list.component.html | 14 +++++--------- .../follows/followers-list/followers-list.component.scss | 8 -------- .../follows/followers-list/followers-list.component.ts | 6 +++--- .../follows/following-list/following-list.component.html | 12 ++++-------- .../follows/following-list/following-list.component.scss | 8 -------- .../follows/following-list/following-list.component.ts | 6 +++--- .../video-redundancies-list.component.ts | 6 +++--- 7 files changed, 18 insertions(+), 42 deletions(-) (limited to 'client/src/app/+admin/follows') diff --git a/client/src/app/+admin/follows/followers-list/followers-list.component.html b/client/src/app/+admin/follows/followers-list/followers-list.component.html index 633de9677..c2e9a4df6 100644 --- a/client/src/app/+admin/follows/followers-list/followers-list.component.html +++ b/client/src/app/+admin/follows/followers-list/followers-list.component.html @@ -4,20 +4,16 @@
-
- - - Clear filters +
+
diff --git a/client/src/app/+admin/follows/followers-list/followers-list.component.scss b/client/src/app/+admin/follows/followers-list/followers-list.component.scss index 12c0cd033..35f38aae0 100644 --- a/client/src/app/+admin/follows/followers-list/followers-list.component.scss +++ b/client/src/app/+admin/follows/followers-list/followers-list.component.scss @@ -1,14 +1,6 @@ @import '_variables'; @import '_mixins'; -.caption { - justify-content: flex-end; - - input { - @include peertube-input-text(250px); - } -} - a { @include disable-default-a-behaviour; display: inline-block; 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 904e3c338..4a312f6aa 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 @@ -59,7 +59,7 @@ export class FollowersListComponent extends RestTable implements OnInit { const handle = follow.follower.name + '@' + follow.follower.host this.notifier.success($localize`${handle} rejected from instance followers`) - this.loadData() + this.reloadData() }, err => { @@ -80,14 +80,14 @@ export class FollowersListComponent extends RestTable implements OnInit { const handle = follow.follower.name + '@' + follow.follower.host this.notifier.success($localize`${handle} removed from instance followers`) - this.loadData() + this.reloadData() }, err => this.notifier.error(err.message) ) } - protected loadData () { + protected reloadData () { this.followService.getFollowers({ pagination: this.pagination, sort: this.sort, search: this.search }) .subscribe( resultList => { diff --git a/client/src/app/+admin/follows/following-list/following-list.component.html b/client/src/app/+admin/follows/following-list/following-list.component.html index f4e6a60fe..e7c0c9088 100644 --- a/client/src/app/+admin/follows/following-list/following-list.component.html +++ b/client/src/app/+admin/follows/following-list/following-list.component.html @@ -4,8 +4,9 @@ @@ -18,13 +19,8 @@
-
- - - Clear filters +
+
diff --git a/client/src/app/+admin/follows/following-list/following-list.component.scss b/client/src/app/+admin/follows/following-list/following-list.component.scss index 797882d9a..9474b0a23 100644 --- a/client/src/app/+admin/follows/following-list/following-list.component.scss +++ b/client/src/app/+admin/follows/following-list/following-list.component.scss @@ -16,14 +16,6 @@ a { } } -.caption { - justify-content: flex-end; - - input { - @include peertube-input-text(250px); - } -} - .follow-button { @include create-button; } 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 f34490cc8..b63fe08c0 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 @@ -45,7 +45,7 @@ export class FollowingListComponent extends RestTable implements OnInit { this.followService.follow(hosts).subscribe( () => { this.notifier.success($localize`Follow request(s) sent!`) - this.loadData() + this.reloadData() }, err => this.notifier.error(err.message) @@ -62,14 +62,14 @@ export class FollowingListComponent extends RestTable implements OnInit { this.followService.unfollow(follow).subscribe( () => { this.notifier.success($localize`You are not following ${follow.following.host} anymore.`) - this.loadData() + this.reloadData() }, err => this.notifier.error(err.message) ) } - protected loadData () { + protected reloadData () { this.followService.getFollowing({ pagination: this.pagination, sort: this.sort, search: this.search }) .subscribe( resultList => { diff --git a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts index d6fd1a1ab..3cd65dd6e 100644 --- a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts +++ b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts @@ -78,7 +78,7 @@ export class VideoRedundanciesListComponent extends RestTable implements OnInit this.pagination.start = 0 this.saveSelectLocalStorage() - this.loadData() + this.reloadData() } getRedundancyStrategy (redundancy: VideoRedundancy) { @@ -145,7 +145,7 @@ export class VideoRedundanciesListComponent extends RestTable implements OnInit .subscribe( () => { this.notifier.success($localize`Video redundancies removed!`) - this.loadData() + this.reloadData() }, err => this.notifier.error(err.message) @@ -153,7 +153,7 @@ export class VideoRedundanciesListComponent extends RestTable implements OnInit } - protected loadData () { + protected reloadData () { const options = { pagination: this.pagination, sort: this.sort, -- cgit v1.2.3