aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-library
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-19 09:24:29 +0200
committerChocobozzz <me@florianbigard.com>2021-08-25 11:24:11 +0200
commitdd24f1bb0a4b252e5342b251ba36853364da7b8e (patch)
tree41a9506d07413f056fb90425705e258f96fdc77d /client/src/app/+my-library
parent2e80d256cc75b4b02c8efc3d3e4cdf57ddf401a8 (diff)
downloadPeerTube-dd24f1bb0a4b252e5342b251ba36853364da7b8e.tar.gz
PeerTube-dd24f1bb0a4b252e5342b251ba36853364da7b8e.tar.zst
PeerTube-dd24f1bb0a4b252e5342b251ba36853364da7b8e.zip
Add video filters to common video pages
Diffstat (limited to 'client/src/app/+my-library')
-rw-r--r--client/src/app/+my-library/my-history/my-history.component.html4
-rw-r--r--client/src/app/+my-library/my-history/my-history.component.ts6
-rw-r--r--client/src/app/+my-library/my-subscriptions/my-subscriptions.component.html2
-rw-r--r--client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.html2
-rw-r--r--client/src/app/+my-library/my-video-playlists/my-video-playlists.component.html2
-rw-r--r--client/src/app/+my-library/my-videos/my-videos.component.html4
-rw-r--r--client/src/app/+my-library/my-videos/my-videos.component.ts6
7 files changed, 15 insertions, 11 deletions
diff --git a/client/src/app/+my-library/my-history/my-history.component.html b/client/src/app/+my-library/my-history/my-history.component.html
index 45ca37e0d..8e564cf93 100644
--- a/client/src/app/+my-library/my-history/my-history.component.html
+++ b/client/src/app/+my-library/my-history/my-history.component.html
@@ -5,7 +5,7 @@
5 5
6<div class="top-buttons"> 6<div class="top-buttons">
7 <div class="search-wrapper"> 7 <div class="search-wrapper">
8 <my-advanced-input-filter (search)="onSearch($event)"></my-advanced-input-filter> 8 <my-advanced-input-filter [emitOnInit]="false" (search)="onSearch($event)"></my-advanced-input-filter>
9 </div> 9 </div>
10 10
11 <div class="history-switch"> 11 <div class="history-switch">
@@ -26,8 +26,8 @@
26 [titlePage]="titlePage" 26 [titlePage]="titlePage"
27 [getVideosObservableFunction]="getVideosObservableFunction" 27 [getVideosObservableFunction]="getVideosObservableFunction"
28 [user]="user" 28 [user]="user"
29 [loadOnInit]="false"
30 i18n-noResultMessage noResultMessage="You don't have any video in your watch history yet." 29 i18n-noResultMessage noResultMessage="You don't have any video in your watch history yet."
31 [enableSelection]="false" 30 [enableSelection]="false"
31 [disabled]="disabled"
32 #videosSelection 32 #videosSelection
33></my-videos-selection> 33></my-videos-selection>
diff --git a/client/src/app/+my-library/my-history/my-history.component.ts b/client/src/app/+my-library/my-history/my-history.component.ts
index a72d22e1c..95cfaee41 100644
--- a/client/src/app/+my-library/my-history/my-history.component.ts
+++ b/client/src/app/+my-library/my-history/my-history.component.ts
@@ -50,6 +50,8 @@ export class MyHistoryComponent implements OnInit, DisableForReuseHook {
50 videos: Video[] = [] 50 videos: Video[] = []
51 search: string 51 search: string
52 52
53 disabled = false
54
53 constructor ( 55 constructor (
54 protected router: Router, 56 protected router: Router,
55 protected serverService: ServerService, 57 protected serverService: ServerService,
@@ -74,11 +76,11 @@ export class MyHistoryComponent implements OnInit, DisableForReuseHook {
74 } 76 }
75 77
76 disableForReuse () { 78 disableForReuse () {
77 this.videosSelection.disableForReuse() 79 this.disabled = true
78 } 80 }
79 81
80 enabledForReuse () { 82 enabledForReuse () {
81 this.videosSelection.enabledForReuse() 83 this.disabled = false
82 } 84 }
83 85
84 reloadData () { 86 reloadData () {
diff --git a/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.html b/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.html
index 1bd459059..ca5ad794a 100644
--- a/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.html
+++ b/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.html
@@ -12,7 +12,7 @@
12 12
13<div class="no-results" i18n *ngIf="pagination.totalItems === 0">You don't have any subscription yet.</div> 13<div class="no-results" i18n *ngIf="pagination.totalItems === 0">You don't have any subscription yet.</div>
14 14
15<div class="video-channels" myInfiniteScroller [autoInit]="true" (nearOfBottom)="onNearOfBottom()" [dataObservable]="onDataSubject.asObservable()"> 15<div class="video-channels" myInfiniteScroller (nearOfBottom)="onNearOfBottom()" [dataObservable]="onDataSubject.asObservable()">
16 <div *ngFor="let videoChannel of videoChannels" class="video-channel"> 16 <div *ngFor="let videoChannel of videoChannels" class="video-channel">
17 <my-actor-avatar [channel]="videoChannel" [internalHref]="[ '/c', videoChannel.nameWithHost ]"></my-actor-avatar> 17 <my-actor-avatar [channel]="videoChannel" [internalHref]="[ '/c', videoChannel.nameWithHost ]"></my-actor-avatar>
18 18
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.html b/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.html
index e7e3c17b3..806dd6f48 100644
--- a/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.html
+++ b/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.html
@@ -34,7 +34,7 @@
34 </div> 34 </div>
35 35
36 <div 36 <div
37 class="videos" myInfiniteScroller [autoInit]="true" (nearOfBottom)="onNearOfBottom()" 37 class="videos" myInfiniteScroller (nearOfBottom)="onNearOfBottom()"
38 cdkDropList (cdkDropListDropped)="drop($event)" [dataObservable]="onDataSubject.asObservable()" 38 cdkDropList (cdkDropListDropped)="drop($event)" [dataObservable]="onDataSubject.asObservable()"
39 > 39 >
40 <div class="video" *ngFor="let playlistElement of playlistElements; trackBy: trackByFn" cdkDrag [cdkDragStartDelay]="getDragStartDelay()"> 40 <div class="video" *ngFor="let playlistElement of playlistElements; trackBy: trackByFn" cdkDrag [cdkDragStartDelay]="getDragStartDelay()">
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.html b/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.html
index 309afcf13..7f5b8bbf4 100644
--- a/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.html
+++ b/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.html
@@ -12,7 +12,7 @@
12 </a> 12 </a>
13</div> 13</div>
14 14
15<div class="video-playlists" myInfiniteScroller [autoInit]="true" (nearOfBottom)="onNearOfBottom()" [dataObservable]="onDataSubject.asObservable()"> 15<div class="video-playlists" myInfiniteScroller (nearOfBottom)="onNearOfBottom()" [dataObservable]="onDataSubject.asObservable()">
16 <div *ngFor="let playlist of videoPlaylists" class="video-playlist"> 16 <div *ngFor="let playlist of videoPlaylists" class="video-playlist">
17 <my-video-playlist-miniature 17 <my-video-playlist-miniature
18 [playlist]="playlist" [toManage]="true" [displayChannel]="true" 18 [playlist]="playlist" [toManage]="true" [displayChannel]="true"
diff --git a/client/src/app/+my-library/my-videos/my-videos.component.html b/client/src/app/+my-library/my-videos/my-videos.component.html
index 0552b8ce4..9f81f0ad7 100644
--- a/client/src/app/+my-library/my-videos/my-videos.component.html
+++ b/client/src/app/+my-library/my-videos/my-videos.component.html
@@ -19,7 +19,7 @@
19</h1> 19</h1>
20 20
21<div class="videos-header d-flex justify-content-between"> 21<div class="videos-header d-flex justify-content-between">
22 <my-advanced-input-filter [filters]="inputFilters" (search)="onSearch($event)"></my-advanced-input-filter> 22 <my-advanced-input-filter [emitOnInit]="false" [filters]="inputFilters" (search)="onSearch($event)"></my-advanced-input-filter>
23 23
24 <div class="peertube-select-container peertube-select-button"> 24 <div class="peertube-select-container peertube-select-button">
25 <select [(ngModel)]="sort" (ngModelChange)="onChangeSortColumn()" class="form-control"> 25 <select [(ngModel)]="sort" (ngModelChange)="onChangeSortColumn()" class="form-control">
@@ -41,7 +41,7 @@
41 [titlePage]="titlePage" 41 [titlePage]="titlePage"
42 [getVideosObservableFunction]="getVideosObservableFunction" 42 [getVideosObservableFunction]="getVideosObservableFunction"
43 [user]="user" 43 [user]="user"
44 [loadOnInit]="false" 44 [disabled]="disabled"
45 #videosSelection 45 #videosSelection
46> 46>
47 <ng-template ptTemplate="globalButtons"> 47 <ng-template ptTemplate="globalButtons">
diff --git a/client/src/app/+my-library/my-videos/my-videos.component.ts b/client/src/app/+my-library/my-videos/my-videos.component.ts
index edb9392dd..72d28ced7 100644
--- a/client/src/app/+my-library/my-videos/my-videos.component.ts
+++ b/client/src/app/+my-library/my-videos/my-videos.component.ts
@@ -54,6 +54,8 @@ export class MyVideosComponent implements OnInit, DisableForReuseHook {
54 } 54 }
55 ] 55 ]
56 56
57 disabled = false
58
57 private search: string 59 private search: string
58 60
59 constructor ( 61 constructor (
@@ -89,11 +91,11 @@ export class MyVideosComponent implements OnInit, DisableForReuseHook {
89 } 91 }
90 92
91 disableForReuse () { 93 disableForReuse () {
92 this.videosSelection.disableForReuse() 94 this.disabled = true
93 } 95 }
94 96
95 enabledForReuse () { 97 enabledForReuse () {
96 this.videosSelection.enabledForReuse() 98 this.disabled = false
97 } 99 }
98 100
99 getVideosObservable (page: number) { 101 getVideosObservable (page: number) {