diff options
Diffstat (limited to 'client/src/app/+admin/moderation/video-blacklist-list')
2 files changed, 17 insertions, 3 deletions
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 7cef787d2..247f441c1 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 | |||
@@ -7,6 +7,7 @@ | |||
7 | <th style="width: 40px"></th> | 7 | <th style="width: 40px"></th> |
8 | <th i18n pSortableColumn="name">Video name <p-sortIcon field="name"></p-sortIcon></th> | 8 | <th i18n pSortableColumn="name">Video name <p-sortIcon field="name"></p-sortIcon></th> |
9 | <th i18n>Sensitive</th> | 9 | <th i18n>Sensitive</th> |
10 | <th i18n>Unfederated</th> | ||
10 | <th i18n pSortableColumn="createdAt">Date <p-sortIcon field="createdAt"></p-sortIcon></th> | 11 | <th i18n pSortableColumn="createdAt">Date <p-sortIcon field="createdAt"></p-sortIcon></th> |
11 | <th style="width: 120px;"></th> | 12 | <th style="width: 120px;"></th> |
12 | </tr> | 13 | </tr> |
@@ -26,7 +27,8 @@ | |||
26 | </a> | 27 | </a> |
27 | </td> | 28 | </td> |
28 | 29 | ||
29 | <td>{{ videoBlacklist.video.nsfw }}</td> | 30 | <td>{{ booleanToText(videoBlacklist.video.nsfw) }}</td> |
31 | <td>{{ booleanToText(videoBlacklist.unfederated) }}</td> | ||
30 | <td>{{ videoBlacklist.createdAt }}</td> | 32 | <td>{{ videoBlacklist.createdAt }}</td> |
31 | 33 | ||
32 | <td class="action-cell"> | 34 | <td class="action-cell"> |
@@ -37,9 +39,9 @@ | |||
37 | 39 | ||
38 | <ng-template pTemplate="rowexpansion" let-videoBlacklist> | 40 | <ng-template pTemplate="rowexpansion" let-videoBlacklist> |
39 | <tr> | 41 | <tr> |
40 | <td class="moderation-expanded" colspan="5"> | 42 | <td class="moderation-expanded" colspan="6"> |
41 | <span i18n class="moderation-expanded-label">Blacklist reason:</span> | 43 | <span i18n class="moderation-expanded-label">Blacklist reason:</span> |
42 | <span class="moderation-expanded-text">{{ videoBlacklist.reason }}</span> | 44 | <span class="moderation-expanded-text" [innerHTML]="toHtml(videoBlacklist.reason)"></span> |
43 | </td> | 45 | </td> |
44 | </tr> | 46 | </tr> |
45 | </ng-template> | 47 | </ng-template> |
diff --git a/client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.ts b/client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.ts index a02e84f67..b27bbbfef 100644 --- a/client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.ts +++ b/client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.ts | |||
@@ -7,6 +7,7 @@ import { VideoBlacklist } from '../../../../../../shared' | |||
7 | import { I18n } from '@ngx-translate/i18n-polyfill' | 7 | import { I18n } from '@ngx-translate/i18n-polyfill' |
8 | import { DropdownAction } from '../../../shared/buttons/action-dropdown.component' | 8 | import { DropdownAction } from '../../../shared/buttons/action-dropdown.component' |
9 | import { Video } from '../../../shared/video/video.model' | 9 | import { Video } from '../../../shared/video/video.model' |
10 | import { MarkdownService } from '@app/shared/renderer' | ||
10 | 11 | ||
11 | @Component({ | 12 | @Component({ |
12 | selector: 'my-video-blacklist-list', | 13 | selector: 'my-video-blacklist-list', |
@@ -26,6 +27,7 @@ export class VideoBlacklistListComponent extends RestTable implements OnInit { | |||
26 | private notifier: Notifier, | 27 | private notifier: Notifier, |
27 | private confirmService: ConfirmService, | 28 | private confirmService: ConfirmService, |
28 | private videoBlacklistService: VideoBlacklistService, | 29 | private videoBlacklistService: VideoBlacklistService, |
30 | private markdownRenderer: MarkdownService, | ||
29 | private i18n: I18n | 31 | private i18n: I18n |
30 | ) { | 32 | ) { |
31 | super() | 33 | super() |
@@ -46,6 +48,16 @@ export class VideoBlacklistListComponent extends RestTable implements OnInit { | |||
46 | return Video.buildClientUrl(videoBlacklist.video.uuid) | 48 | return Video.buildClientUrl(videoBlacklist.video.uuid) |
47 | } | 49 | } |
48 | 50 | ||
51 | booleanToText (value: boolean) { | ||
52 | if (value === true) return this.i18n('yes') | ||
53 | |||
54 | return this.i18n('no') | ||
55 | } | ||
56 | |||
57 | toHtml (text: string) { | ||
58 | return this.markdownRenderer.textMarkdownToHTML(text) | ||
59 | } | ||
60 | |||
49 | async removeVideoFromBlacklist (entry: VideoBlacklist) { | 61 | async removeVideoFromBlacklist (entry: VideoBlacklist) { |
50 | const confirmMessage = this.i18n( | 62 | const confirmMessage = this.i18n( |
51 | 'Do you really want to remove this video from the blacklist? It will be available again in the videos list.' | 63 | 'Do you really want to remove this video from the blacklist? It will be available again in the videos list.' |