diff options
author | Chocobozzz <me@florianbigard.com> | 2020-07-27 11:40:30 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-07-31 11:35:19 +0200 |
commit | 94148c9028829b5576a5dcbfba2c7fb9cf6443d3 (patch) | |
tree | 2774f272329111abd03e8441ff936da11fb1a3f3 /client/src/app/+admin/moderation/abuse-list/abuse-list.component.html | |
parent | 441e453ae53e491b09c9b09b00b041788176ce64 (diff) | |
download | PeerTube-94148c9028829b5576a5dcbfba2c7fb9cf6443d3.tar.gz PeerTube-94148c9028829b5576a5dcbfba2c7fb9cf6443d3.tar.zst PeerTube-94148c9028829b5576a5dcbfba2c7fb9cf6443d3.zip |
Add abuse messages management in my account
Diffstat (limited to 'client/src/app/+admin/moderation/abuse-list/abuse-list.component.html')
-rw-r--r-- | client/src/app/+admin/moderation/abuse-list/abuse-list.component.html | 193 |
1 files changed, 1 insertions, 192 deletions
diff --git a/client/src/app/+admin/moderation/abuse-list/abuse-list.component.html b/client/src/app/+admin/moderation/abuse-list/abuse-list.component.html index 9fae5667f..9a6c124e1 100644 --- a/client/src/app/+admin/moderation/abuse-list/abuse-list.component.html +++ b/client/src/app/+admin/moderation/abuse-list/abuse-list.component.html | |||
@@ -3,195 +3,4 @@ | |||
3 | <ng-container i18n>Reports</ng-container> | 3 | <ng-container i18n>Reports</ng-container> |
4 | </h1> | 4 | </h1> |
5 | 5 | ||
6 | <p-table | 6 | <my-abuse-list-table viewType="admin" baseRoute="/admin/moderation/abuses/list"></my-abuse-list-table> |
7 | [value]="abuses" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" | ||
8 | [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" [resizableColumns]="true" [lazyLoadOnInit]="false" | ||
9 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate | ||
10 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} reports" | ||
11 | (onPage)="onPage($event)" [expandedRowKeys]="expandedRows" | ||
12 | > | ||
13 | <ng-template pTemplate="caption"> | ||
14 | <div class="caption"> | ||
15 | <div class="ml-auto"> | ||
16 | <div class="input-group has-feedback has-clear"> | ||
17 | <div class="input-group-prepend c-hand" ngbDropdown placement="bottom-left auto" container="body"> | ||
18 | <div class="input-group-text" ngbDropdownToggle> | ||
19 | <span class="caret" aria-haspopup="menu" role="button"></span> | ||
20 | </div> | ||
21 | |||
22 | <div role="menu" ngbDropdownMenu> | ||
23 | <h6 class="dropdown-header" i18n>Advanced report filters</h6> | ||
24 | <a [routerLink]="[ '/admin/moderation/abuses/list' ]" [queryParams]="{ 'search': 'state:pending' }" class="dropdown-item" i18n>Unsolved reports</a> | ||
25 | <a [routerLink]="[ '/admin/moderation/abuses/list' ]" [queryParams]="{ 'search': 'state:accepted' }" class="dropdown-item" i18n>Accepted reports</a> | ||
26 | <a [routerLink]="[ '/admin/moderation/abuses/list' ]" [queryParams]="{ 'search': 'state:rejected' }" class="dropdown-item" i18n>Refused reports</a> | ||
27 | <a [routerLink]="[ '/admin/moderation/abuses/list' ]" [queryParams]="{ 'search': 'videoIs:blacklisted' }" class="dropdown-item" i18n>Reports with blocked videos</a> | ||
28 | <a [routerLink]="[ '/admin/moderation/abuses/list' ]" [queryParams]="{ 'search': 'videoIs:deleted' }" class="dropdown-item" i18n>Reports with deleted videos</a> | ||
29 | </div> | ||
30 | </div> | ||
31 | <input | ||
32 | type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..." | ||
33 | (keyup)="onAbuseSearch($event)" | ||
34 | > | ||
35 | <a class="glyphicon glyphicon-remove-sign form-control-feedback form-control-clear" (click)="resetTableFilter()"></a> | ||
36 | <span class="sr-only" i18n>Clear filters</span> | ||
37 | </div> | ||
38 | </div> | ||
39 | </div> | ||
40 | </ng-template> | ||
41 | |||
42 | <ng-template pTemplate="header"> | ||
43 | <tr> <!-- header --> | ||
44 | <th style="width: 40px;"></th> | ||
45 | <th style="width: 20%;" pResizableColumn i18n>Reporter</th> | ||
46 | <th i18n>Video/Comment/Account</th> | ||
47 | <th style="width: 150px;" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th> | ||
48 | <th i18n pSortableColumn="state" style="width: 80px;">State <p-sortIcon field="state"></p-sortIcon></th> | ||
49 | <th i18n style="width: 80px;">Messages</th> | ||
50 | <th style="width: 150px;"></th> | ||
51 | </tr> | ||
52 | </ng-template> | ||
53 | |||
54 | <ng-template pTemplate="body" let-expanded="expanded" let-abuse> | ||
55 | <tr> | ||
56 | <td class="c-hand" [pRowToggler]="abuse" i18n-ngbTooltip ngbTooltip="More information" placement="top-left" container="body"> | ||
57 | <span class="expander"> | ||
58 | <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i> | ||
59 | </span> | ||
60 | </td> | ||
61 | |||
62 | <td> | ||
63 | <a *ngIf="abuse.reporterAccount" [href]="abuse.reporterAccount.url" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer"> | ||
64 | <div class="chip two-lines"> | ||
65 | <img | ||
66 | class="avatar" | ||
67 | [src]="abuse.reporterAccount.avatar?.path" | ||
68 | (error)="switchToDefaultAvatar($event)" | ||
69 | alt="Avatar" | ||
70 | > | ||
71 | <div> | ||
72 | {{ abuse.reporterAccount.displayName }} | ||
73 | <span>{{ abuse.reporterAccount.nameWithHost }}</span> | ||
74 | </div> | ||
75 | </div> | ||
76 | </a> | ||
77 | |||
78 | <span i18n *ngIf="!abuse.reporterAccount"> | ||
79 | Deleted account | ||
80 | </span> | ||
81 | </td> | ||
82 | |||
83 | <ng-container *ngIf="abuse.video"> | ||
84 | |||
85 | <td *ngIf="!abuse.video.deleted"> | ||
86 | <a [href]="getVideoUrl(abuse)" class="table-video-link" [title]="abuse.video.name" target="_blank" rel="noopener noreferrer"> | ||
87 | <div class="table-video"> | ||
88 | <div class="table-video-image"> | ||
89 | <img [src]="abuse.video.thumbnailPath"> | ||
90 | <span | ||
91 | class="table-video-image-label" *ngIf="abuse.count > 1" | ||
92 | i18n-title title="This video has been reported multiple times." | ||
93 | > | ||
94 | {{ abuse.nth }}/{{ abuse.count }} | ||
95 | </span> | ||
96 | </div> | ||
97 | |||
98 | <div class="table-video-text"> | ||
99 | <div> | ||
100 | <span *ngIf="!abuse.video.blacklisted" class="glyphicon glyphicon-new-window"></span> | ||
101 | <span *ngIf="abuse.video.blacklisted" i18n-title title="The video was blocked" class="glyphicon glyphicon-ban-circle"></span> | ||
102 | {{ abuse.video.name }} | ||
103 | </div> | ||
104 | <div i18n>by {{ abuse.video.channel?.displayName }} on {{ abuse.video.channel?.host }} </div> | ||
105 | </div> | ||
106 | </div> | ||
107 | </a> | ||
108 | </td> | ||
109 | |||
110 | <td *ngIf="abuse.video.deleted" class="c-hand" [pRowToggler]="abuse"> | ||
111 | <div class="table-video" i18n-title title="Video was deleted"> | ||
112 | <div class="table-video-image"> | ||
113 | <span i18n>Deleted</span> | ||
114 | </div> | ||
115 | |||
116 | <div class="table-video-text"> | ||
117 | <div> | ||
118 | {{ abuse.video.name }} | ||
119 | <span class="glyphicon glyphicon-trash"></span> | ||
120 | </div> | ||
121 | <div i18n>by {{ abuse.video.channel?.displayName }} on {{ abuse.video.channel?.host }} </div> | ||
122 | </div> | ||
123 | </div> | ||
124 | </td> | ||
125 | </ng-container> | ||
126 | |||
127 | <ng-container *ngIf="abuse.comment"> | ||
128 | <td> | ||
129 | <a [href]="getCommentUrl(abuse)" [innerHTML]="abuse.truncatedCommentHtml" class="table-comment-link" | ||
130 | [title]="abuse.comment.video.name" target="_blank" rel="noopener noreferrer" | ||
131 | ></a> | ||
132 | |||
133 | <div class="comment-flagged-account" *ngIf="abuse.flaggedAccount">by {{ abuse.flaggedAccount.displayName }}</div> | ||
134 | </td> | ||
135 | </ng-container> | ||
136 | |||
137 | <ng-container *ngIf="!abuse.comment && !abuse.video"> | ||
138 | <td *ngIf="abuse.flaggedAccount"> | ||
139 | <a [href]="getAccountUrl(abuse)" class="table-account-link" target="_blank" rel="noopener noreferrer"> | ||
140 | <span>{{ abuse.flaggedAccount.displayName }}</span> | ||
141 | |||
142 | <span class="account-flagged-handle">{{ abuse.flaggedAccount.nameWithHostForced }}</span> | ||
143 | </a> | ||
144 | </td> | ||
145 | |||
146 | <td i18n *ngIf="!abuse.flaggedAccount"> | ||
147 | Account deleted | ||
148 | </td> | ||
149 | |||
150 | </ng-container> | ||
151 | |||
152 | |||
153 | <td class="c-hand" [pRowToggler]="abuse">{{ abuse.createdAt | date: 'short' }}</td> | ||
154 | |||
155 | <td class="c-hand abuse-states" [pRowToggler]="abuse"> | ||
156 | <span *ngIf="isAbuseAccepted(abuse)" [title]="abuse.state.label" class="glyphicon glyphicon-ok"></span> | ||
157 | <span *ngIf="isAbuseRejected(abuse)" [title]="abuse.state.label" class="glyphicon glyphicon-remove"></span> | ||
158 | <span *ngIf="abuse.moderationComment" container="body" placement="left auto" [ngbTooltip]="abuse.moderationComment" class="glyphicon glyphicon-comment"></span> | ||
159 | </td> | ||
160 | |||
161 | <td class="c-hand abuse-messages" (click)="openAbuseMessagesModal(abuse)"> | ||
162 | {{ abuse.countMessages }} | ||
163 | |||
164 | <my-global-icon iconName="message-circle"></my-global-icon> | ||
165 | </td> | ||
166 | |||
167 | <td class="action-cell"> | ||
168 | <my-action-dropdown | ||
169 | [ngClass]="{ 'show': expanded }" placement="bottom-right top-right left auto" container="body" | ||
170 | i18n-label label="Actions" [actions]="abuseActions" [entry]="abuse" | ||
171 | ></my-action-dropdown> | ||
172 | </td> | ||
173 | </tr> | ||
174 | </ng-template> | ||
175 | |||
176 | <ng-template pTemplate="rowexpansion" let-abuse> | ||
177 | <tr> | ||
178 | <td class="expand-cell" colspan="6"> | ||
179 | <my-abuse-details [abuse]="abuse"></my-abuse-details> | ||
180 | </td> | ||
181 | </tr> | ||
182 | </ng-template> | ||
183 | |||
184 | <ng-template pTemplate="emptymessage"> | ||
185 | <tr> | ||
186 | <td colspan="6"> | ||
187 | <div class="no-results"> | ||
188 | <ng-container *ngIf="search" i18n>No abuses found matching current filters.</ng-container> | ||
189 | <ng-container *ngIf="!search" i18n>No abuses found.</ng-container> | ||
190 | </div> | ||
191 | </td> | ||
192 | </tr> | ||
193 | </ng-template> | ||
194 | </p-table> | ||
195 | |||
196 | <my-moderation-comment-modal #moderationCommentModal (commentUpdated)="onModerationCommentUpdated()"></my-moderation-comment-modal> | ||
197 | <my-abuse-message-modal #abuseMessagesModal (countMessagesUpdated)="onCountMessagesUpdated($event)"></my-abuse-message-modal> | ||