diff options
Diffstat (limited to 'client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts')
-rw-r--r-- | client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts b/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts index 803651505..d83fc1324 100644 --- a/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts +++ b/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts | |||
@@ -5,7 +5,7 @@ import { ActivatedRoute, Router } from '@angular/router' | |||
5 | import { AuthService, ConfirmService, LocalStorageService, Notifier, ScreenService, ServerService, UserService } from '@app/core' | 5 | import { AuthService, ConfirmService, LocalStorageService, Notifier, ScreenService, ServerService, UserService } from '@app/core' |
6 | import { immutableAssign } from '@app/helpers' | 6 | import { immutableAssign } from '@app/helpers' |
7 | import { VideoChannel, VideoChannelService, VideoService } from '@app/shared/shared-main' | 7 | import { VideoChannel, VideoChannelService, VideoService } from '@app/shared/shared-main' |
8 | import { AbstractVideoList } from '@app/shared/shared-video-miniature' | 8 | import { AbstractVideoList, MiniatureDisplayOptions } from '@app/shared/shared-video-miniature' |
9 | import { VideoFilter } from '@shared/models' | 9 | import { VideoFilter } from '@shared/models' |
10 | 10 | ||
11 | @Component({ | 11 | @Component({ |
@@ -16,12 +16,24 @@ import { VideoFilter } from '@shared/models' | |||
16 | ] | 16 | ] |
17 | }) | 17 | }) |
18 | export class VideoChannelVideosComponent extends AbstractVideoList implements OnInit, OnDestroy { | 18 | export class VideoChannelVideosComponent extends AbstractVideoList implements OnInit, OnDestroy { |
19 | // No value because we don't want a page title | ||
19 | titlePage: string | 20 | titlePage: string |
20 | loadOnInit = false | 21 | loadOnInit = false |
21 | loadUserVideoPreferences = true | 22 | loadUserVideoPreferences = true |
22 | 23 | ||
23 | filter: VideoFilter = null | 24 | filter: VideoFilter = null |
24 | 25 | ||
26 | displayOptions: MiniatureDisplayOptions = { | ||
27 | date: true, | ||
28 | views: true, | ||
29 | by: false, | ||
30 | avatar: false, | ||
31 | privacyLabel: true, | ||
32 | privacyText: false, | ||
33 | state: false, | ||
34 | blacklistInfo: false | ||
35 | } | ||
36 | |||
25 | private videoChannel: VideoChannel | 37 | private videoChannel: VideoChannel |
26 | private videoChannelSub: Subscription | 38 | private videoChannelSub: Subscription |
27 | 39 | ||
@@ -83,13 +95,6 @@ export class VideoChannelVideosComponent extends AbstractVideoList implements On | |||
83 | 95 | ||
84 | return this.videoService | 96 | return this.videoService |
85 | .getVideoChannelVideos(options) | 97 | .getVideoChannelVideos(options) |
86 | .pipe( | ||
87 | tap(({ total }) => { | ||
88 | this.titlePage = total === 1 | ||
89 | ? $localize`Published 1 video` | ||
90 | : $localize`Published ${total} videos` | ||
91 | }) | ||
92 | ) | ||
93 | } | 98 | } |
94 | 99 | ||
95 | generateSyndicationList () { | 100 | generateSyndicationList () { |
@@ -101,4 +106,8 @@ export class VideoChannelVideosComponent extends AbstractVideoList implements On | |||
101 | 106 | ||
102 | this.reloadVideos() | 107 | this.reloadVideos() |
103 | } | 108 | } |
109 | |||
110 | displayAsRow () { | ||
111 | return this.screenService.isInMobileView() | ||
112 | } | ||
104 | } | 113 | } |