X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=client%2Fsrc%2Fapp%2Fvideos%2Fvideo-list%2Fvideo-user-subscriptions.component.ts;h=0cd67db29dd8a690623695142d694a4dce63a3b5;hb=13adf228d0cc48995cf70c0a782a1d717873f6e0;hp=3caa371d8886562d5ee67609c3bf0a60b1d849d1;hpb=b91bc1d1f3591c35ab4426f6ab594b4bd9f1ef62;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/videos/video-list/video-user-subscriptions.component.ts b/client/src/app/videos/video-list/video-user-subscriptions.component.ts index 3caa371d8..0cd67db29 100644 --- a/client/src/app/videos/video-list/video-user-subscriptions.component.ts +++ b/client/src/app/videos/video-list/video-user-subscriptions.component.ts @@ -9,6 +9,7 @@ import { I18n } from '@ngx-translate/i18n-polyfill' import { ScreenService } from '@app/shared/misc/screen.service' import { OwnerDisplayType } from '@app/shared/video/video-miniature.component' import { Notifier, ServerService } from '@app/core' +import { HooksService } from '@app/core/plugins/hooks.service' @Component({ selector: 'my-videos-user-subscriptions', @@ -29,11 +30,17 @@ export class VideoUserSubscriptionsComponent extends AbstractVideoList implement protected notifier: Notifier, protected authService: AuthService, protected screenService: ScreenService, - private videoService: VideoService + private videoService: VideoService, + private hooks: HooksService ) { super() this.titlePage = i18n('Videos from your subscriptions') + this.actions.push({ + routerLink: '/my-account/subscriptions', + label: i18n('Subscriptions'), + iconName: 'cog' + }) } ngOnInit () { @@ -46,8 +53,18 @@ export class VideoUserSubscriptionsComponent extends AbstractVideoList implement getVideosObservable (page: number) { const newPagination = immutableAssign(this.pagination, { currentPage: page }) + const params = { + videoPagination: newPagination, + sort: this.sort + } - return this.videoService.getUserSubscriptionVideos(newPagination, this.sort) + return this.hooks.wrapObsFun( + this.videoService.getUserSubscriptionVideos.bind(this.videoService), + params, + 'common', + 'filter:api.user-subscriptions-videos.videos.list.params', + 'filter:api.user-subscriptions-videos.videos.list.result' + ) } generateSyndicationList () {