2020-07-27 11:40:30 +02:00
|
|
|
<p-table
|
2021-05-03 14:33:34 +02:00
|
|
|
[value]="abuses" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions"
|
|
|
|
[sortField]="sort.field" [sortOrder]="sort.order" dataKey="id" [resizableColumns]="true"
|
|
|
|
[lazy]="true" (onLazyLoad)="loadLazy($event)" [lazyLoadOnInit]="false"
|
2020-07-27 11:40:30 +02:00
|
|
|
[showCurrentPageReport]="true" i18n-currentPageReportTemplate
|
|
|
|
currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} reports"
|
2021-12-24 15:37:42 +01:00
|
|
|
[expandedRowKeys]="expandedRows"
|
2020-07-27 11:40:30 +02:00
|
|
|
>
|
|
|
|
<ng-template pTemplate="caption">
|
|
|
|
<div class="caption">
|
2022-06-08 16:14:24 +02:00
|
|
|
<div class="ms-auto">
|
2021-05-03 14:33:34 +02:00
|
|
|
<my-advanced-input-filter [filters]="inputFilters" (search)="onSearch($event)"></my-advanced-input-filter>
|
2020-07-27 11:40:30 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<ng-template pTemplate="header">
|
|
|
|
<tr> <!-- header -->
|
|
|
|
<th style="width: 40px;"></th>
|
2020-11-16 14:26:50 +01:00
|
|
|
<th style="width: 150px;"></th>
|
2020-07-27 11:40:30 +02:00
|
|
|
<th *ngIf="isAdminView()" style="width: 20%;" pResizableColumn i18n>Reporter</th>
|
|
|
|
<th i18n>Video/Comment/Account</th>
|
|
|
|
<th style="width: 150px;" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
|
|
|
|
<th i18n pSortableColumn="state" style="width: 80px;">State <p-sortIcon field="state"></p-sortIcon></th>
|
|
|
|
<th i18n style="width: 80px;">Messages</th>
|
2020-07-28 09:57:16 +02:00
|
|
|
<th i18n *ngIf="isAdminView()" style="width: 100px;">Internal note</th>
|
2020-07-27 11:40:30 +02:00
|
|
|
</tr>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<ng-template pTemplate="body" let-expanded="expanded" let-abuse>
|
|
|
|
<tr>
|
2021-10-27 11:54:48 +02:00
|
|
|
<td class="expand-cell" [pRowToggler]="abuse">
|
2021-10-27 11:42:05 +02:00
|
|
|
<my-table-expander-icon [expanded]="expanded"></my-table-expander-icon>
|
2020-07-27 11:40:30 +02:00
|
|
|
</td>
|
|
|
|
|
2020-11-16 14:26:50 +01:00
|
|
|
<td class="action-cell">
|
|
|
|
<my-action-dropdown
|
|
|
|
[ngClass]="{ 'show': expanded }" placement="bottom-right top-right left auto" container="body"
|
|
|
|
i18n-label label="Actions" [actions]="abuseActions" [entry]="abuse"
|
|
|
|
></my-action-dropdown>
|
|
|
|
</td>
|
|
|
|
|
2020-07-27 11:40:30 +02:00
|
|
|
<td *ngIf="isAdminView()">
|
|
|
|
<a *ngIf="abuse.reporterAccount" [href]="abuse.reporterAccount.url" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer">
|
|
|
|
<div class="chip two-lines">
|
2022-02-28 08:34:43 +01:00
|
|
|
<my-actor-avatar [account]="abuse.reporterAccount" size="32"></my-actor-avatar>
|
2020-07-27 11:40:30 +02:00
|
|
|
<div>
|
|
|
|
{{ abuse.reporterAccount.displayName }}
|
|
|
|
<span>{{ abuse.reporterAccount.nameWithHost }}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<span i18n *ngIf="!abuse.reporterAccount">
|
|
|
|
Deleted account
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<ng-container *ngIf="abuse.video">
|
|
|
|
|
|
|
|
<td *ngIf="!abuse.video.deleted">
|
2021-10-27 11:42:05 +02:00
|
|
|
<my-video-cell [video]="abuse.video">
|
|
|
|
<span image>
|
|
|
|
<span
|
|
|
|
class="table-video-image-label" *ngIf="abuse.count > 1"
|
|
|
|
i18n-title title="This video has been reported multiple times."
|
|
|
|
>
|
|
|
|
{{ abuse.nth }}/{{ abuse.count }}
|
|
|
|
</span>
|
|
|
|
</span>
|
2020-07-27 11:40:30 +02:00
|
|
|
|
2021-10-27 11:42:05 +02:00
|
|
|
<span name>
|
2022-06-13 10:14:03 +02:00
|
|
|
<my-global-icon *ngIf="abuse.video.blacklisted" iconName="no" i18n-title title="The video was blocked"></my-global-icon>
|
2021-10-27 11:42:05 +02:00
|
|
|
</span>
|
|
|
|
</my-video-cell>
|
2020-07-27 11:40:30 +02:00
|
|
|
</td>
|
|
|
|
|
|
|
|
<td *ngIf="abuse.video.deleted" class="c-hand" [pRowToggler]="abuse">
|
|
|
|
<div class="table-video" i18n-title title="Video was deleted">
|
|
|
|
<div class="table-video-text">
|
|
|
|
<div>
|
|
|
|
{{ abuse.video.name }}
|
2022-06-13 10:14:03 +02:00
|
|
|
<my-global-icon iconName="delete"></my-global-icon>
|
2020-07-27 11:40:30 +02:00
|
|
|
</div>
|
|
|
|
<div i18n>by {{ abuse.video.channel?.displayName }} on {{ abuse.video.channel?.host }} </div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</ng-container>
|
|
|
|
|
|
|
|
<ng-container *ngIf="abuse.comment">
|
|
|
|
<td>
|
|
|
|
<a [href]="getCommentUrl(abuse)" [innerHTML]="abuse.truncatedCommentHtml" class="table-comment-link"
|
|
|
|
[title]="abuse.comment.video.name" target="_blank" rel="noopener noreferrer"
|
|
|
|
></a>
|
|
|
|
|
|
|
|
<div class="comment-flagged-account" *ngIf="abuse.flaggedAccount">by {{ abuse.flaggedAccount.displayName }}</div>
|
|
|
|
</td>
|
|
|
|
</ng-container>
|
|
|
|
|
|
|
|
<ng-container *ngIf="!abuse.comment && !abuse.video">
|
|
|
|
<td *ngIf="abuse.flaggedAccount">
|
|
|
|
<a [href]="getAccountUrl(abuse)" class="table-account-link" target="_blank" rel="noopener noreferrer">
|
|
|
|
<span>{{ abuse.flaggedAccount.displayName }}</span>
|
|
|
|
|
|
|
|
<span class="account-flagged-handle">{{ abuse.flaggedAccount.nameWithHostForced }}</span>
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td i18n *ngIf="!abuse.flaggedAccount">
|
|
|
|
Account deleted
|
|
|
|
</td>
|
|
|
|
|
|
|
|
</ng-container>
|
|
|
|
|
|
|
|
<td class="c-hand" [pRowToggler]="abuse">{{ abuse.createdAt | date: 'short' }}</td>
|
|
|
|
|
|
|
|
<td class="c-hand abuse-states" [pRowToggler]="abuse">
|
2022-06-13 10:14:03 +02:00
|
|
|
<my-global-icon *ngIf="isAbuseAccepted(abuse)" [title]="abuse.state.label" iconName="tick"></my-global-icon>
|
|
|
|
<my-global-icon *ngIf="isAbuseRejected(abuse)" [title]="abuse.state.label" iconName="cross"></my-global-icon>
|
2020-07-27 11:40:30 +02:00
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="c-hand abuse-messages" (click)="openAbuseMessagesModal(abuse)">
|
|
|
|
<ng-container *ngIf="isLocalAbuse(abuse)">
|
|
|
|
{{ abuse.countMessages }}
|
|
|
|
|
|
|
|
<my-global-icon iconName="message-circle"></my-global-icon>
|
|
|
|
</ng-container>
|
|
|
|
</td>
|
|
|
|
|
2020-07-28 09:57:16 +02:00
|
|
|
<td *ngIf="isAdminView()" class="internal-note" container="body" placement="left auto" [ngbTooltip]="abuse.moderationComment">
|
|
|
|
{{ abuse.moderationComment }}
|
|
|
|
</td>
|
2020-07-27 11:40:30 +02:00
|
|
|
</tr>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<ng-template pTemplate="rowexpansion" let-abuse>
|
|
|
|
<tr>
|
2021-06-07 13:17:31 +02:00
|
|
|
<td *ngIf="isAdminView()" class="expand-cell" colspan="8">
|
|
|
|
<my-abuse-details [abuse]="abuse" [isAdminView]="true"></my-abuse-details>
|
|
|
|
</td>
|
|
|
|
<td *ngIf="!isAdminView()" class="expand-cell" colspan="6">
|
|
|
|
<my-abuse-details [abuse]="abuse" [isAdminView]="false"></my-abuse-details>
|
2020-07-27 11:40:30 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<ng-template pTemplate="emptymessage">
|
|
|
|
<tr>
|
|
|
|
<td colspan="6">
|
|
|
|
<div class="no-results">
|
|
|
|
<ng-container *ngIf="search" i18n>No abuses found matching current filters.</ng-container>
|
|
|
|
<ng-container *ngIf="!search" i18n>No abuses found.</ng-container>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</ng-template>
|
|
|
|
</p-table>
|
|
|
|
|
|
|
|
<my-moderation-comment-modal #moderationCommentModal (commentUpdated)="onModerationCommentUpdated()"></my-moderation-comment-modal>
|
|
|
|
<my-abuse-message-modal #abuseMessagesModal [isAdminView]="isAdminView()" (countMessagesUpdated)="onCountMessagesUpdated($event)"></my-abuse-message-modal>
|