X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2F%2Bmy-library%2Fmy-videos%2Fmy-videos.component.ts;h=b1f3baf80148c9f0f5883b0aad8229e185927022;hb=4beda9e12adc7b1f3b178cecd6863ebf3cf431f1;hp=4f9b71cc6052c2fa36b53627aa97af6f09319b5d;hpb=1378c0d343028f3d40d7d795422684ab9e6a1599;p=github%2FChocobozzz%2FPeerTube.git 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 4f9b71cc6..b1f3baf80 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 @@ -49,11 +49,13 @@ export class MyVideosComponent implements OnInit, DisableForReuseHook { inputFilters: AdvancedInputFilter[] = [ { - queryParams: { 'search': 'isLive:true' }, + queryParams: { search: 'isLive:true' }, label: $localize`Only live videos` } ] + disabled = false + private search: string constructor ( @@ -73,6 +75,10 @@ export class MyVideosComponent implements OnInit, DisableForReuseHook { this.buildActions() this.user = this.authService.getUser() + + if (this.route.snapshot.queryParams['search']) { + this.search = this.route.snapshot.queryParams['search'] + } } onSearch (search: string) { @@ -89,11 +95,11 @@ export class MyVideosComponent implements OnInit, DisableForReuseHook { } disableForReuse () { - this.videosSelection.disableForReuse() + this.disabled = true } enabledForReuse () { - this.videosSelection.enabledForReuse() + this.disabled = false } getVideosObservable (page: number) { @@ -107,7 +113,7 @@ export class MyVideosComponent implements OnInit, DisableForReuseHook { async deleteSelectedVideos () { const toDeleteVideosIds = Object.keys(this.selection) - .filter(k => this.selection[ k ] === true) + .filter(k => this.selection[k] === true) .map(k => parseInt(k, 10)) const res = await this.confirmService.confirm(