From d384061366ae06294c0e222f0fb7ec4f0a172f39 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Sun, 19 Apr 2020 20:26:25 +0200 Subject: Empty states for tables --- .../followers-list/followers-list.component.html | 11 ++++++++ .../followers-list/followers-list.component.ts | 2 +- .../following-list/following-list.component.html | 11 ++++++++ .../following-list/following-list.component.ts | 2 +- .../src/app/+admin/follows/follows.component.scss | 6 +++++ .../video-redundancies-list.component.html | 13 ++++++++- .../video-redundancies-list.component.ts | 2 +- .../instance-account-blocklist.component.html | 31 ++++++++++++++++++++-- .../instance-account-blocklist.component.ts | 5 ++++ .../instance-server-blocklist.component.html | 13 ++++++++- .../+admin/moderation/moderation.component.scss | 4 +++ .../video-abuse-list.component.html | 13 ++++++++- .../video-blacklist-list.component.html | 11 ++++++++ 13 files changed, 116 insertions(+), 8 deletions(-) (limited to 'client/src/app') 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 7455cdf2b..d4f2b8dcc 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 @@ -41,4 +41,15 @@ + + + + +
+ No follower found matching current filters. + Your instance doesn't have any follower. +
+ + +
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 585902827..81a91c1d1 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 @@ -9,7 +9,7 @@ import { I18n } from '@ngx-translate/i18n-polyfill' @Component({ selector: 'my-followers-list', templateUrl: './followers-list.component.html', - styleUrls: [ './followers-list.component.scss' ] + styleUrls: [ '../follows.component.scss', './followers-list.component.scss' ] }) export class FollowersListComponent extends RestTable implements OnInit { followers: ActorFollow[] = [] 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 f3bb7216b..e4189d334 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 @@ -45,6 +45,17 @@ + + + + +
+ No host found matching current filters. + Your instance is not follwing any host. +
+ + +
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 477a6c0d7..a4dd07302 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 @@ -11,7 +11,7 @@ import { BatchDomainsModalComponent } from '@app/+admin/config/shared/batch-doma @Component({ selector: 'my-followers-list', templateUrl: './following-list.component.html', - styleUrls: [ './following-list.component.scss' ] + styleUrls: [ '../follows.component.scss', './following-list.component.scss' ] }) export class FollowingListComponent extends RestTable implements OnInit { @ViewChild('batchDomainsModal') batchDomainsModal: BatchDomainsModalComponent diff --git a/client/src/app/+admin/follows/follows.component.scss b/client/src/app/+admin/follows/follows.component.scss index 766d7853b..32394f698 100644 --- a/client/src/app/+admin/follows/follows.component.scss +++ b/client/src/app/+admin/follows/follows.component.scss @@ -1,4 +1,10 @@ +@import "mixins"; + .form-sub-title { flex-grow: 0; margin-right: 30px; } + +.empty-table-message { + @include empty-state; +} 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 a8dcc69d2..f3b980970 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 @@ -19,7 +19,7 @@ Strategy - Video name + Video name Video URL Total size @@ -68,6 +68,17 @@ + + + + +
+ Your instance doesn't mirror any video. + Your instance has no mirrored videos. +
+ + +
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 2b62d30a3..f91800175 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 @@ -13,7 +13,7 @@ import { RedundancyService } from '@app/shared/video/redundancy.service' @Component({ selector: 'my-video-redundancies-list', templateUrl: './video-redundancies-list.component.html', - styleUrls: [ './video-redundancies-list.component.scss' ] + styleUrls: [ '../follows.component.scss', './video-redundancies-list.component.scss' ] }) export class VideoRedundanciesListComponent extends RestTable implements OnInit { private static LOCAL_STORAGE_DISPLAY_TYPE = 'video-redundancies-list-display-type' 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 d340b5e57..df0a8247e 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 @@ -17,7 +17,7 @@ - Account + Account Muted at @@ -25,11 +25,38 @@ - {{ accountBlock.blockedAccount.nameWithHost }} + + +
+ Avatar +
+ {{ accountBlock.blockedAccount.displayName }} + {{ accountBlock.blockedAccount.nameWithHost }} +
+
+
+ + {{ accountBlock.createdAt }}
+ + + + +
+ No account found matching current filters. + No account found. +
+ + +
diff --git a/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.ts b/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.ts index 607b1cbe0..6bd015234 100644 --- a/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.ts +++ b/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.ts @@ -4,6 +4,7 @@ import { I18n } from '@ngx-translate/i18n-polyfill' import { RestPagination, RestTable } from '@app/shared' import { SortMeta } from 'primeng/api' import { AccountBlock, BlocklistService } from '@app/shared/blocklist' +import { Actor } from '@app/shared/actor/actor.model' @Component({ selector: 'my-instance-account-blocklist', @@ -34,6 +35,10 @@ export class InstanceAccountBlocklistComponent extends RestTable implements OnIn return 'InstanceAccountBlocklistComponent' } + switchToDefaultAvatar ($event: Event) { + ($event.target as HTMLImageElement).src = Actor.GET_DEFAULT_AVATAR_URL() + } + unblockAccount (accountBlock: AccountBlock) { const blockedAccount = accountBlock.blockedAccount diff --git a/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.html b/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.html index b6c87fdc8..d4e6933af 100644 --- a/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.html +++ b/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.html @@ -21,7 +21,7 @@ - Instance + Instance Muted at @@ -41,6 +41,17 @@ + + + + +
+ No server found matching current filters. + No server found. +
+ + +
diff --git a/client/src/app/+admin/moderation/moderation.component.scss b/client/src/app/+admin/moderation/moderation.component.scss index 97af74541..cf06401cf 100644 --- a/client/src/app/+admin/moderation/moderation.component.scss +++ b/client/src/app/+admin/moderation/moderation.component.scss @@ -15,6 +15,10 @@ } } +.empty-table-message { + @include empty-state; +} + .moderation-expanded { font-size: 90%; 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 e2c08f910..c15e98942 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 @@ -39,7 +39,7 @@
Avatar @@ -175,6 +175,17 @@ + + + + +
+ No video abuses found matching current filters. + No video abuses found. +
+ + +
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 6375dacd9..eade57b71 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 @@ -82,5 +82,16 @@ + + + + +
+ No blacklisted video found matching current filters. + No blacklisted video found. +
+ + +
-- cgit v1.2.3