From 5fd4ca0051c7e7f3f8c47bcbde5cab0c56532e64 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Sat, 18 Apr 2020 22:57:20 +0200 Subject: Add nth abuse count for a given video, add reporter/reportee reports stats --- .../+admin/moderation/moderation.component.scss | 34 +++++++---- .../video-abuse-list.component.html | 66 ++++++++++++++++++++-- .../video-abuse-list.component.scss | 21 +++++++ .../video-abuse-list/video-abuse-list.component.ts | 4 +- .../video-blacklist-list.component.html | 13 ++++- 5 files changed, 115 insertions(+), 23 deletions(-) (limited to 'client/src/app') diff --git a/client/src/app/+admin/moderation/moderation.component.scss b/client/src/app/+admin/moderation/moderation.component.scss index 9ceff1161..ef6a39b5d 100644 --- a/client/src/app/+admin/moderation/moderation.component.scss +++ b/client/src/app/+admin/moderation/moderation.component.scss @@ -7,19 +7,23 @@ margin-right: 30px; } -.moderation-expanded-label { - font-weight: $font-semibold; - display: inline-block; - vertical-align: top; - text-align: right; -} - -.moderation-expanded-text { - display: inline-block; - word-wrap: break-word; +.moderation-expanded { + font-size: 90%; - ::ng-deep p:last-child { - margin-bottom: 0px !important; + .moderation-expanded-label { + font-weight: $font-semibold; + display: inline-block; + vertical-align: top; + text-align: right; + } + + .moderation-expanded-text { + display: inline-flex; + word-wrap: break-word; + + ::ng-deep p:last-child { + margin-bottom: 0px !important; + } } } @@ -58,3 +62,9 @@ .chip { @include chip; } + +my-action-dropdown.show { + ::ng-deep .dropdown-root { + display: block !important; + } +} 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 c1ce093d7..67ef28408 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 @@ -54,7 +54,13 @@
-
+
+ + {{ videoAbuse.nth }}/{{ videoAbuse.count }} +
{{ videoAbuse.video.name }} @@ -85,11 +91,14 @@ - + - + @@ -97,14 +106,59 @@ -
+
+
+
+ Reportee + +
+ Avatar +
+ {{ videoAbuse.video.channel.ownerAccount ? createByString(videoAbuse.video.channel.ownerAccount) : '' }} +
+
+ + {videoAbuse.countReportsForReportee, plural, =1 {1 report} other {{{ videoAbuse.countReportsForReportee }} reports}} + +
+
+
+ Updated + +
+ + +
+ Report
- Note: + Note
diff --git a/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.scss b/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.scss index 9b60c39dc..b5dc53b3a 100644 --- a/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.scss +++ b/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.scss @@ -9,6 +9,15 @@ } } +.video-abuse-date-updated { + font-size: 90%; + margin-top: .1rem; +} + +.video-abuse-links { + @include disable-default-a-behaviour; +} + .video-abuse-video-link { @include disable-outline; position: relative; @@ -32,6 +41,7 @@ display: inline-flex; justify-content: center; align-items: center; + position: relative; img { height: 100%; @@ -42,6 +52,17 @@ span { color: var(--inputPlaceholderColor); } + + .video-abuse-video-image-label { + @include static-thumbnail-overlay; + position: absolute; + border-radius: 3px; + font-size: 10px; + padding: 0 3px; + line-height: 1.3; + bottom: 2px; + right: 2px; + } } .video-abuse-video-text { diff --git a/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts b/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts index 6dcf96ccf..e4e78cdf7 100644 --- a/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts +++ b/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts @@ -46,7 +46,7 @@ export class VideoAbuseListComponent extends RestTable implements OnInit { private i18n: I18n, private markdownRenderer: MarkdownService, private sanitizer: DomSanitizer, - private route: ActivatedRoute, + private route: ActivatedRoute ) { super() @@ -223,7 +223,7 @@ export class VideoAbuseListComponent extends RestTable implements OnInit { } getVideoEmbed (videoAbuse: VideoAbuse) { - const absoluteAPIUrl = 'http://localhost:9000' || getAbsoluteAPIUrl() + const absoluteAPIUrl = 'http://localhost:9000' || getAbsoluteAPIUrl() // TODO const embedUrl = buildVideoLink({ baseUrl: absoluteAPIUrl + '/videos/embed/' + videoAbuse.video.uuid, warningTitle: false 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 2f9fc8ba4..c5c0fdbbf 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 @@ -30,9 +30,16 @@ - {{ booleanToText(videoBlacklist.video.nsfw) }} - {{ booleanToText(videoBlacklist.unfederated) }} - {{ videoBlacklist.createdAt }} + + {{ booleanToText(videoBlacklist.video.nsfw) }} + {{ booleanToText(videoBlacklist.unfederated) }} + {{ videoBlacklist.createdAt }} + + + {{ booleanToText(videoBlacklist.video.nsfw) }} + {{ booleanToText(videoBlacklist.unfederated) }} + {{ videoBlacklist.createdAt }} + -- cgit v1.2.3