From b8cf27c0f86d205a279d03b83e0e6728f46da67f Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Sun, 19 Apr 2020 23:42:06 +0200 Subject: [PATCH] Unify paginator disabling when no result is displayable, fix batch domain add for non-https --- .../followers-list.component.html | 4 +++- .../followers-list.component.ts | 3 ++- .../following-list.component.html | 21 +++++++++++++++---- .../following-list.component.scss | 14 +++++++++++++ .../following-list.component.ts | 7 ++++++- .../video-redundancies-list.component.html | 2 +- .../instance-account-blocklist.component.html | 2 +- .../instance-server-blocklist.component.html | 10 ++------- .../instance-server-blocklist.component.ts | 4 ---- .../video-abuse-list.component.html | 2 +- .../video-blacklist-list.component.html | 2 +- .../plugin-list-installed.component.ts | 4 ++-- .../+admin/system/jobs/jobs.component.html | 2 +- .../users/user-list/user-list.component.html | 2 +- .../my-account-blocklist.component.html | 2 +- ...my-account-server-blocklist.component.html | 2 +- .../my-account-ownership.component.html | 2 +- .../my-account-video-imports.component.html | 2 +- 18 files changed, 56 insertions(+), 31 deletions(-) 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 d4f2b8dcc..41f557510 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 @@ -1,6 +1,8 @@
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 81a91c1d1..00f447bb2 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 @@ -14,7 +14,8 @@ import { I18n } from '@ngx-translate/i18n-polyfill' export class FollowersListComponent extends RestTable implements OnInit { followers: ActorFollow[] = [] totalRecords = 0 - rowsPerPage = 10 + rowsPerPageOptions = [ 20, 50, 100 ] + rowsPerPage = this.rowsPerPageOptions[0] sort: SortMeta = { field: 'createdAt', order: -1 } pagination: RestPagination = { count: this.rowsPerPage, start: 0 } 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 e4189d334..5fb0f4900 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 @@ -1,6 +1,8 @@
@@ -29,7 +31,12 @@ - {{ follow.following.host }} + + + {{ follow.following.host }} + + + Accepted Pending @@ -51,11 +58,17 @@
No host found matching current filters. - Your instance is not follwing any host. + Your instance is not following anyone.
- + + +
+ It seems that you are not on a HTTPS server. Your webserver needs to have TLS activated in order to follow servers. +
+
+
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 f4656b88d..563f8d2bc 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 @@ -1,6 +1,20 @@ @import '_variables'; @import '_mixins'; +a { + @include disable-default-a-behaviour; + display: inline-block; + + &, &:hover { + color: var(--mainForegroundColor); + } + + span { + font-size: 80%; + color: var(--inputPlaceholderColor); + } +} + .caption { justify-content: flex-end; 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 a4dd07302..e1b1f8aeb 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 @@ -18,7 +18,8 @@ export class FollowingListComponent extends RestTable implements OnInit { following: ActorFollow[] = [] totalRecords = 0 - rowsPerPage = 10 + rowsPerPageOptions = [ 20, 50, 100 ] + rowsPerPage = this.rowsPerPageOptions[0] sort: SortMeta = { field: 'createdAt', order: -1 } pagination: RestPagination = { count: this.rowsPerPage, start: 0 } @@ -43,6 +44,10 @@ export class FollowingListComponent extends RestTable implements OnInit { this.batchDomainsModal.openModal() } + httpEnabled () { + return window.location.protocol === 'https:' + } + async addFollowing (hosts: string[]) { this.followService.follow(hosts).subscribe( () => { diff --git a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.html b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.html index f3b980970..debde2f85 100644 --- a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.html +++ b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.html @@ -12,7 +12,7 @@
diff --git a/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.html b/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.html index df0a8247e..ffc8a8e39 100644 --- a/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.html +++ b/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.html @@ -1,5 +1,5 @@ - - -
- It seems that you are not on a HTTPS server. Your webserver needs to have TLS activated in order to follow servers. -
-
-
+ diff --git a/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.ts b/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.ts index 4efadc386..344e2d135 100644 --- a/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.ts +++ b/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.ts @@ -51,10 +51,6 @@ export class InstanceServerBlocklistComponent extends RestTable implements OnIni ) } - httpEnabled () { - return window.location.protocol === 'https:' - } - addServersToBlock () { this.batchDomainsModal.openModal() } diff --git a/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.html b/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.html index 9e084cb73..6dacfe243 100644 --- a/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.html +++ b/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.html @@ -154,7 +154,7 @@
- Report + Report #{{ videoAbuse.id }}
diff --git a/client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.html b/client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.html index eade57b71..5eabcb37f 100644 --- a/client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.html +++ b/client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.html @@ -1,5 +1,5 @@ diff --git a/client/src/app/+admin/users/user-list/user-list.component.html b/client/src/app/+admin/users/user-list/user-list.component.html index a555af4c4..e7624f48f 100644 --- a/client/src/app/+admin/users/user-list/user-list.component.html +++ b/client/src/app/+admin/users/user-list/user-list.component.html @@ -8,7 +8,7 @@
diff --git a/client/src/app/+my-account/my-account-blocklist/my-account-server-blocklist.component.html b/client/src/app/+my-account/my-account-blocklist/my-account-server-blocklist.component.html index 0f7ca1f85..6359b4461 100644 --- a/client/src/app/+my-account/my-account-blocklist/my-account-server-blocklist.component.html +++ b/client/src/app/+my-account/my-account-blocklist/my-account-server-blocklist.component.html @@ -3,7 +3,7 @@
diff --git a/client/src/app/+my-account/my-account-ownership/my-account-ownership.component.html b/client/src/app/+my-account/my-account-ownership/my-account-ownership.component.html index c5fd3ccb9..354176a11 100644 --- a/client/src/app/+my-account/my-account-ownership/my-account-ownership.component.html +++ b/client/src/app/+my-account/my-account-ownership/my-account-ownership.component.html @@ -1,7 +1,7 @@ -- 2.25.1