diff options
Diffstat (limited to 'client/src/app/+admin')
4 files changed, 22 insertions, 9 deletions
diff --git a/client/src/app/+admin/video-abuses/video-abuse-list/video-abuse-list.component.html b/client/src/app/+admin/video-abuses/video-abuse-list/video-abuse-list.component.html index aa0e18c70..f213ab4b0 100644 --- a/client/src/app/+admin/video-abuses/video-abuse-list/video-abuse-list.component.html +++ b/client/src/app/+admin/video-abuses/video-abuse-list/video-abuse-list.component.html | |||
@@ -42,7 +42,7 @@ | |||
42 | <td>{{ videoAbuse.createdAt }}</td> | 42 | <td>{{ videoAbuse.createdAt }}</td> |
43 | 43 | ||
44 | <td> | 44 | <td> |
45 | <a [href]="videoAbuse.video.url" i18n-title title="Go to the video" target="_blank" rel="noopener noreferrer"> | 45 | <a [href]="getVideoUrl(videoAbuse)" i18n-title title="Go to the video" target="_blank" rel="noopener noreferrer"> |
46 | {{ videoAbuse.video.name }} | 46 | {{ videoAbuse.video.name }} |
47 | </a> | 47 | </a> |
48 | </td> | 48 | </td> |
diff --git a/client/src/app/+admin/video-abuses/video-abuse-list/video-abuse-list.component.ts b/client/src/app/+admin/video-abuses/video-abuse-list/video-abuse-list.component.ts index a850c0ec2..377e9c80f 100644 --- a/client/src/app/+admin/video-abuses/video-abuse-list/video-abuse-list.component.ts +++ b/client/src/app/+admin/video-abuses/video-abuse-list/video-abuse-list.component.ts | |||
@@ -8,6 +8,7 @@ import { I18n } from '@ngx-translate/i18n-polyfill' | |||
8 | import { DropdownAction } from '@app/shared/buttons/action-dropdown.component' | 8 | import { DropdownAction } from '@app/shared/buttons/action-dropdown.component' |
9 | import { ConfirmService } from '@app/core' | 9 | import { ConfirmService } from '@app/core' |
10 | import { ModerationCommentModalComponent } from './moderation-comment-modal.component' | 10 | import { ModerationCommentModalComponent } from './moderation-comment-modal.component' |
11 | import { Video } from '@app/shared/video/video.model' | ||
11 | 12 | ||
12 | @Component({ | 13 | @Component({ |
13 | selector: 'my-video-abuse-list', | 14 | selector: 'my-video-abuse-list', |
@@ -79,6 +80,10 @@ export class VideoAbuseListComponent extends RestTable implements OnInit { | |||
79 | return videoAbuse.state.id === VideoAbuseState.REJECTED | 80 | return videoAbuse.state.id === VideoAbuseState.REJECTED |
80 | } | 81 | } |
81 | 82 | ||
83 | getVideoUrl (videoAbuse: VideoAbuse) { | ||
84 | return Video.buildClientUrl(videoAbuse.video.uuid) | ||
85 | } | ||
86 | |||
82 | async removeVideoAbuse (videoAbuse: VideoAbuse) { | 87 | async removeVideoAbuse (videoAbuse: VideoAbuse) { |
83 | const res = await this.confirmService.confirm(this.i18n('Do you really want to delete this abuse?'), this.i18n('Delete')) | 88 | const res = await this.confirmService.confirm(this.i18n('Do you really want to delete this abuse?'), this.i18n('Delete')) |
84 | if (res === false) return | 89 | if (res === false) return |
diff --git a/client/src/app/+admin/video-blacklist/video-blacklist-list/video-blacklist-list.component.html b/client/src/app/+admin/video-blacklist/video-blacklist-list/video-blacklist-list.component.html index 78989dc58..05b3a300c 100644 --- a/client/src/app/+admin/video-blacklist/video-blacklist-list/video-blacklist-list.component.html +++ b/client/src/app/+admin/video-blacklist/video-blacklist-list/video-blacklist-list.component.html | |||
@@ -10,8 +10,7 @@ | |||
10 | <tr> | 10 | <tr> |
11 | <th style="width: 40px"></th> | 11 | <th style="width: 40px"></th> |
12 | <th i18n pSortableColumn="name">Video name <p-sortIcon field="name"></p-sortIcon></th> | 12 | <th i18n pSortableColumn="name">Video name <p-sortIcon field="name"></p-sortIcon></th> |
13 | <th i18n>NSFW</th> | 13 | <th i18n>Sensitive</th> |
14 | <th i18n>UUID</th> | ||
15 | <th i18n pSortableColumn="createdAt">Date <p-sortIcon field="createdAt"></p-sortIcon></th> | 14 | <th i18n pSortableColumn="createdAt">Date <p-sortIcon field="createdAt"></p-sortIcon></th> |
16 | <th style="width: 50px;"></th> | 15 | <th style="width: 50px;"></th> |
17 | </tr> | 16 | </tr> |
@@ -25,9 +24,13 @@ | |||
25 | </span> | 24 | </span> |
26 | </td> | 25 | </td> |
27 | 26 | ||
28 | <td>{{ videoBlacklist.video.name }}</td> | 27 | <td> |
28 | <a [href]="getVideoUrl(videoBlacklist)" i18n-title title="Go to the video" target="_blank" rel="noopener noreferrer"> | ||
29 | {{ videoBlacklist.video.name }} | ||
30 | </a> | ||
31 | </td> | ||
32 | |||
29 | <td>{{ videoBlacklist.video.nsfw }}</td> | 33 | <td>{{ videoBlacklist.video.nsfw }}</td> |
30 | <td>{{ videoBlacklist.video.uuid }}</td> | ||
31 | <td>{{ videoBlacklist.createdAt }}</td> | 34 | <td>{{ videoBlacklist.createdAt }}</td> |
32 | 35 | ||
33 | <td class="action-cell"> | 36 | <td class="action-cell"> |
diff --git a/client/src/app/+admin/video-blacklist/video-blacklist-list/video-blacklist-list.component.ts b/client/src/app/+admin/video-blacklist/video-blacklist-list/video-blacklist-list.component.ts index 00b0ac57e..0618252b8 100644 --- a/client/src/app/+admin/video-blacklist/video-blacklist-list/video-blacklist-list.component.ts +++ b/client/src/app/+admin/video-blacklist/video-blacklist-list/video-blacklist-list.component.ts | |||
@@ -3,9 +3,10 @@ import { SortMeta } from 'primeng/components/common/sortmeta' | |||
3 | import { NotificationsService } from 'angular2-notifications' | 3 | import { NotificationsService } from 'angular2-notifications' |
4 | import { ConfirmService } from '../../../core' | 4 | import { ConfirmService } from '../../../core' |
5 | import { RestPagination, RestTable, VideoBlacklistService } from '../../../shared' | 5 | import { RestPagination, RestTable, VideoBlacklistService } from '../../../shared' |
6 | import { BlacklistedVideo } from '../../../../../../shared' | 6 | import { VideoBlacklist } from '../../../../../../shared' |
7 | import { I18n } from '@ngx-translate/i18n-polyfill' | 7 | import { I18n } from '@ngx-translate/i18n-polyfill' |
8 | import { DropdownAction } from '@app/shared/buttons/action-dropdown.component' | 8 | import { DropdownAction } from '@app/shared/buttons/action-dropdown.component' |
9 | import { Video } from '@app/shared/video/video.model' | ||
9 | 10 | ||
10 | @Component({ | 11 | @Component({ |
11 | selector: 'my-video-blacklist-list', | 12 | selector: 'my-video-blacklist-list', |
@@ -13,13 +14,13 @@ import { DropdownAction } from '@app/shared/buttons/action-dropdown.component' | |||
13 | styleUrls: [ './video-blacklist-list.component.scss' ] | 14 | styleUrls: [ './video-blacklist-list.component.scss' ] |
14 | }) | 15 | }) |
15 | export class VideoBlacklistListComponent extends RestTable implements OnInit { | 16 | export class VideoBlacklistListComponent extends RestTable implements OnInit { |
16 | blacklist: BlacklistedVideo[] = [] | 17 | blacklist: VideoBlacklist[] = [] |
17 | totalRecords = 0 | 18 | totalRecords = 0 |
18 | rowsPerPage = 10 | 19 | rowsPerPage = 10 |
19 | sort: SortMeta = { field: 'createdAt', order: 1 } | 20 | sort: SortMeta = { field: 'createdAt', order: 1 } |
20 | pagination: RestPagination = { count: this.rowsPerPage, start: 0 } | 21 | pagination: RestPagination = { count: this.rowsPerPage, start: 0 } |
21 | 22 | ||
22 | videoBlacklistActions: DropdownAction<BlacklistedVideo>[] = [] | 23 | videoBlacklistActions: DropdownAction<VideoBlacklist>[] = [] |
23 | 24 | ||
24 | constructor ( | 25 | constructor ( |
25 | private notificationsService: NotificationsService, | 26 | private notificationsService: NotificationsService, |
@@ -41,7 +42,11 @@ export class VideoBlacklistListComponent extends RestTable implements OnInit { | |||
41 | this.loadSort() | 42 | this.loadSort() |
42 | } | 43 | } |
43 | 44 | ||
44 | async removeVideoFromBlacklist (entry: BlacklistedVideo) { | 45 | getVideoUrl (videoBlacklist: VideoBlacklist) { |
46 | return Video.buildClientUrl(videoBlacklist.video.uuid) | ||
47 | } | ||
48 | |||
49 | async removeVideoFromBlacklist (entry: VideoBlacklist) { | ||
45 | const confirmMessage = this.i18n( | 50 | const confirmMessage = this.i18n( |
46 | 'Do you really want to remove this video from the blacklist? It will be available again in the videos list.' | 51 | 'Do you really want to remove this video from the blacklist? It will be available again in the videos list.' |
47 | ) | 52 | ) |