diff options
Diffstat (limited to 'client/src/app/+admin/overview/videos/video-list.component.ts')
-rw-r--r-- | client/src/app/+admin/overview/videos/video-list.component.ts | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/client/src/app/+admin/overview/videos/video-list.component.ts b/client/src/app/+admin/overview/videos/video-list.component.ts index a445bc209..dd9225e6a 100644 --- a/client/src/app/+admin/overview/videos/video-list.component.ts +++ b/client/src/app/+admin/overview/videos/video-list.component.ts | |||
@@ -3,7 +3,7 @@ import { Component, OnInit } from '@angular/core' | |||
3 | import { ActivatedRoute, Router } from '@angular/router' | 3 | import { ActivatedRoute, Router } from '@angular/router' |
4 | import { AuthService, ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' | 4 | import { AuthService, ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' |
5 | import { DropdownAction, Video, VideoService } from '@app/shared/shared-main' | 5 | import { DropdownAction, Video, VideoService } from '@app/shared/shared-main' |
6 | import { UserRight } from '@shared/models' | 6 | import { UserRight, VideoPrivacy, VideoState } from '@shared/models' |
7 | import { AdvancedInputFilter } from '@app/shared/shared-forms' | 7 | import { AdvancedInputFilter } from '@app/shared/shared-forms' |
8 | import { VideoActionsDisplayType } from '@app/shared/shared-video-miniature' | 8 | import { VideoActionsDisplayType } from '@app/shared/shared-video-miniature' |
9 | 9 | ||
@@ -28,8 +28,12 @@ export class VideoListComponent extends RestTable implements OnInit { | |||
28 | title: $localize`Advanced filters`, | 28 | title: $localize`Advanced filters`, |
29 | children: [ | 29 | children: [ |
30 | { | 30 | { |
31 | queryParams: { search: 'local:true' }, | 31 | queryParams: { search: 'isLocal:false' }, |
32 | label: $localize`Only local videos` | 32 | label: $localize`Remote videos` |
33 | }, | ||
34 | { | ||
35 | queryParams: { search: 'isLocal:true' }, | ||
36 | label: $localize`Local videos` | ||
33 | } | 37 | } |
34 | ] | 38 | ] |
35 | } | 39 | } |
@@ -88,6 +92,28 @@ export class VideoListComponent extends RestTable implements OnInit { | |||
88 | this.reloadData() | 92 | this.reloadData() |
89 | } | 93 | } |
90 | 94 | ||
95 | getPrivacyBadgeClass (privacy: VideoPrivacy) { | ||
96 | if (privacy === VideoPrivacy.PUBLIC) return 'badge-blue' | ||
97 | |||
98 | return 'badge-yellow' | ||
99 | } | ||
100 | |||
101 | isUnpublished (state: VideoState) { | ||
102 | return state !== VideoState.PUBLISHED | ||
103 | } | ||
104 | |||
105 | isAccountBlocked (video: Video) { | ||
106 | return video.blockedOwner | ||
107 | } | ||
108 | |||
109 | isServerBlocked (video: Video) { | ||
110 | return video.blockedServer | ||
111 | } | ||
112 | |||
113 | isVideoBlocked (video: Video) { | ||
114 | return video.blacklisted | ||
115 | } | ||
116 | |||
91 | protected reloadData () { | 117 | protected reloadData () { |
92 | this.selectedVideos = [] | 118 | this.selectedVideos = [] |
93 | 119 | ||