]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-video-miniature/videos-list.component.ts
Deprecate filter video query
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-video-miniature / videos-list.component.ts
index 10de97298b4517a49354fedf0b26a8803f158a4b..3db8352578957232dcce2bd1b0a0ddcd86f06390 100644 (file)
@@ -59,6 +59,8 @@ export class VideosListComponent implements OnInit, OnChanges, OnDestroy {
 
   @Input() headerActions: HeaderAction[] = []
 
+  @Input() hideScopeFilter = false
+
   @Input() displayOptions: MiniatureDisplayOptions = {
     date: true,
     views: true,
@@ -109,7 +111,11 @@ export class VideosListComponent implements OnInit, OnChanges, OnDestroy {
   }
 
   ngOnInit () {
-    this.filters = new VideoFilters(this.defaultSort, this.defaultScope)
+    const hiddenFilters = this.hideScopeFilter
+      ? [ 'scope' ]
+      : []
+
+    this.filters = new VideoFilters(this.defaultSort, this.defaultScope, hiddenFilters)
     this.filters.load({ ...this.route.snapshot.queryParams, scope: this.defaultScope })
 
     this.groupedDateLabels = {