From b8cf27c0f86d205a279d03b83e0e6728f46da67f Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Sun, 19 Apr 2020 23:42:06 +0200 Subject: Unify paginator disabling when no result is displayable, fix batch domain add for non-https --- .../followers-list/followers-list.component.html | 4 +++- .../followers-list/followers-list.component.ts | 3 ++- .../following-list/following-list.component.html | 21 +++++++++++++++++---- .../following-list/following-list.component.scss | 14 ++++++++++++++ .../following-list/following-list.component.ts | 7 ++++++- .../video-redundancies-list.component.html | 2 +- 6 files changed, 43 insertions(+), 8 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 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 @@
-- cgit v1.2.3