From 801d957155d574bda984206021cdd1fe58ef56b9 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Sun, 3 May 2020 16:24:12 +0200 Subject: [PATCH] Move abuse-list details into its own component --- client/src/app/+admin/admin.module.ts | 2 + .../video-abuse-details.component.html | 77 +++++++++++++++++++ .../video-abuse-details.component.ts | 16 ++++ .../video-abuse-list.component.html | 75 +----------------- 4 files changed, 96 insertions(+), 74 deletions(-) create mode 100644 client/src/app/+admin/moderation/video-abuse-list/video-abuse-details.component.html create mode 100644 client/src/app/+admin/moderation/video-abuse-list/video-abuse-details.component.ts diff --git a/client/src/app/+admin/admin.module.ts b/client/src/app/+admin/admin.module.ts index 16273f6d8..d04313c0a 100644 --- a/client/src/app/+admin/admin.module.ts +++ b/client/src/app/+admin/admin.module.ts @@ -29,6 +29,7 @@ import { PluginApiService } from '@app/+admin/plugins/shared/plugin-api.service' import { VideoRedundancyInformationComponent } from '@app/+admin/follows/video-redundancies-list/video-redundancy-information.component' import { ChartModule } from 'primeng/chart' import { BatchDomainsModalComponent } from './config/shared/batch-domains-modal.component' +import { VideoAbuseDetailsComponent } from './moderation/video-abuse-list/video-abuse-details.component' @NgModule({ imports: [ @@ -60,6 +61,7 @@ import { BatchDomainsModalComponent } from './config/shared/batch-domains-modal. ModerationComponent, VideoBlacklistListComponent, VideoAbuseListComponent, + VideoAbuseDetailsComponent, VideoAutoBlacklistListComponent, ModerationCommentModalComponent, InstanceServerBlocklistComponent, diff --git a/client/src/app/+admin/moderation/video-abuse-list/video-abuse-details.component.html b/client/src/app/+admin/moderation/video-abuse-list/video-abuse-details.component.html new file mode 100644 index 000000000..704d43ac4 --- /dev/null +++ b/client/src/app/+admin/moderation/video-abuse-list/video-abuse-details.component.html @@ -0,0 +1,77 @@ +
+ + + + +
+
+
+ The video was deleted + The video was blacklisted +
+
+
+
+
\ No newline at end of file diff --git a/client/src/app/+admin/moderation/video-abuse-list/video-abuse-details.component.ts b/client/src/app/+admin/moderation/video-abuse-list/video-abuse-details.component.ts new file mode 100644 index 000000000..5481915b9 --- /dev/null +++ b/client/src/app/+admin/moderation/video-abuse-list/video-abuse-details.component.ts @@ -0,0 +1,16 @@ +import { Component, ViewEncapsulation, Input } from '@angular/core' +import { VideoAbuse } from '../../../../../../shared' +import { Account } from '@app/shared/account/account.model' + +@Component({ + selector: 'my-video-abuse-details', + templateUrl: './video-abuse-details.component.html', + styleUrls: [ '../moderation.component.scss' ] +}) +export class VideoAbuseDetailsComponent { + @Input() videoAbuse: VideoAbuse + + createByString (account: Account) { + return Account.CREATE_BY_STRING(account.name, account.host) + } +} 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 bf73f9169..2e7b60e2f 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 @@ -133,80 +133,7 @@ -
- -
- - - - -
- Reportee - -
- Avatar -
- {{ videoAbuse.video.channel.ownerAccount ? createByString(videoAbuse.video.channel.ownerAccount) : '' }} -
-
- - {videoAbuse.countReportsForReportee, plural, =1 {1 report} other {{{ videoAbuse.countReportsForReportee }} reports}} - -
-
- -
- Updated - -
- - -
- Report #{{ videoAbuse.id }} - -
- -
- Note - -
- -
- - -
-
-
- The video was deleted - The video was blacklisted -
-
-
-
-
+
-- 2.25.1