aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-video-miniature
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-11-12 14:19:56 +0100
committerChocobozzz <me@florianbigard.com>2021-11-12 14:23:22 +0100
commit527a52ac4295a072927ff46761766a8b181a7603 (patch)
tree632f66b1691d8d72f04630671af8bdf1655d6b00 /client/src/app/shared/shared-video-miniature
parent8f2608e9a9d54c87ace636f99cdb9d2a7730990f (diff)
downloadPeerTube-527a52ac4295a072927ff46761766a8b181a7603.tar.gz
PeerTube-527a52ac4295a072927ff46761766a8b181a7603.tar.zst
PeerTube-527a52ac4295a072927ff46761766a8b181a7603.zip
Add ability to filter out public videos from admin
Diffstat (limited to 'client/src/app/shared/shared-video-miniature')
-rw-r--r--client/src/app/shared/shared-video-miniature/video-filters.model.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/client/src/app/shared/shared-video-miniature/video-filters.model.ts b/client/src/app/shared/shared-video-miniature/video-filters.model.ts
index 5ad7cf3f7..982880b0e 100644
--- a/client/src/app/shared/shared-video-miniature/video-filters.model.ts
+++ b/client/src/app/shared/shared-video-miniature/video-filters.model.ts
@@ -1,6 +1,6 @@
1import { intoArray, toBoolean } from '@app/helpers' 1import { intoArray, toBoolean } from '@app/helpers'
2import { AttributesOnly } from '@shared/core-utils' 2import { AttributesOnly, getAllPrivacies } from '@shared/core-utils'
3import { BooleanBothQuery, NSFWPolicyType, VideoInclude, VideoSortField } from '@shared/models' 3import { BooleanBothQuery, NSFWPolicyType, VideoInclude, VideoPrivacy, VideoSortField } from '@shared/models'
4 4
5type VideoFiltersKeys = { 5type VideoFiltersKeys = {
6 [ id in keyof AttributesOnly<VideoFilters> ]: any 6 [ id in keyof AttributesOnly<VideoFilters> ]: any
@@ -198,13 +198,15 @@ export class VideoFilters {
198 toVideosAPIObject () { 198 toVideosAPIObject () {
199 let isLocal: boolean 199 let isLocal: boolean
200 let include: VideoInclude 200 let include: VideoInclude
201 let privacyOneOf: VideoPrivacy[]
201 202
202 if (this.scope === 'local') { 203 if (this.scope === 'local') {
203 isLocal = true 204 isLocal = true
204 } 205 }
205 206
206 if (this.allVideos) { 207 if (this.allVideos) {
207 include = VideoInclude.NOT_PUBLISHED_STATE | VideoInclude.HIDDEN_PRIVACY 208 include = VideoInclude.NOT_PUBLISHED_STATE
209 privacyOneOf = getAllPrivacies()
208 } 210 }
209 211
210 let isLive: boolean 212 let isLive: boolean
@@ -219,6 +221,7 @@ export class VideoFilters {
219 search: this.search, 221 search: this.search,
220 isLocal, 222 isLocal,
221 include, 223 include,
224 privacyOneOf,
222 isLive 225 isLive
223 } 226 }
224 } 227 }