aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts')
-rw-r--r--client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts18
1 files changed, 0 insertions, 18 deletions
diff --git a/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts b/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts
index 297993e39..10f5861b9 100644
--- a/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts
+++ b/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts
@@ -1,8 +1,6 @@
1import * as debug from 'debug' 1import * as debug from 'debug'
2import truncate from 'lodash-es/truncate' 2import truncate from 'lodash-es/truncate'
3import { SortMeta } from 'primeng/api' 3import { SortMeta } from 'primeng/api'
4import { buildVideoOrPlaylistEmbed } from 'src/assets/player/utils'
5import { environment } from 'src/environments/environment'
6import { Component, Input, OnInit, ViewChild } from '@angular/core' 4import { Component, Input, OnInit, ViewChild } from '@angular/core'
7import { DomSanitizer } from '@angular/platform-browser' 5import { DomSanitizer } from '@angular/platform-browser'
8import { ActivatedRoute, Router } from '@angular/router' 6import { ActivatedRoute, Router } from '@angular/router'
@@ -10,7 +8,6 @@ import { ConfirmService, MarkdownService, Notifier, RestPagination, RestTable }
10import { Account, Actor, DropdownAction, Video, VideoService } from '@app/shared/shared-main' 8import { Account, Actor, DropdownAction, Video, VideoService } from '@app/shared/shared-main'
11import { AbuseService, BlocklistService, VideoBlockService } from '@app/shared/shared-moderation' 9import { AbuseService, BlocklistService, VideoBlockService } from '@app/shared/shared-moderation'
12import { VideoCommentService } from '@app/shared/shared-video-comment' 10import { VideoCommentService } from '@app/shared/shared-video-comment'
13import { buildVideoEmbedLink, decorateVideoLink } from '@shared/core-utils'
14import { AbuseState, AdminAbuse } from '@shared/models' 11import { AbuseState, AdminAbuse } from '@shared/models'
15import { AdvancedInputFilter } from '../shared-forms' 12import { AdvancedInputFilter } from '../shared-forms'
16import { AbuseMessageModalComponent } from './abuse-message-modal.component' 13import { AbuseMessageModalComponent } from './abuse-message-modal.component'
@@ -133,19 +130,6 @@ export class AbuseListTableComponent extends RestTable implements OnInit {
133 return '/a/' + abuse.flaggedAccount.nameWithHost 130 return '/a/' + abuse.flaggedAccount.nameWithHost
134 } 131 }
135 132
136 getVideoEmbed (abuse: AdminAbuse) {
137 return buildVideoOrPlaylistEmbed(
138 decorateVideoLink({
139 url: buildVideoEmbedLink(abuse.video, environment.originServerUrl),
140 title: false,
141 warningTitle: false,
142 startTime: abuse.video.startAt,
143 stopTime: abuse.video.endAt
144 }),
145 abuse.video.name
146 )
147 }
148
149 async removeAbuse (abuse: AdminAbuse) { 133 async removeAbuse (abuse: AdminAbuse) {
150 const res = await this.confirmService.confirm($localize`Do you really want to delete this abuse report?`, $localize`Delete`) 134 const res = await this.confirmService.confirm($localize`Do you really want to delete this abuse report?`, $localize`Delete`)
151 if (res === false) return 135 if (res === false) return
@@ -220,8 +204,6 @@ export class AbuseListTableComponent extends RestTable implements OnInit {
220 } 204 }
221 205
222 if (abuse.video) { 206 if (abuse.video) {
223 abuse.embedHtml = this.sanitizer.bypassSecurityTrustHtml(this.getVideoEmbed(abuse))
224
225 if (abuse.video.channel?.ownerAccount) { 207 if (abuse.video.channel?.ownerAccount) {
226 abuse.video.channel.ownerAccount = new Account(abuse.video.channel.ownerAccount) 208 abuse.video.channel.ownerAccount = new Account(abuse.video.channel.ownerAccount)
227 } 209 }