aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-video-miniature
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-04 13:31:41 +0200
committerChocobozzz <me@florianbigard.com>2021-06-04 15:45:44 +0200
commit2989628b7913383b39ac34c7db8666a21f8e5037 (patch)
treeac7759177c04e524e7845143fd685aefb49e810e /client/src/app/shared/shared-video-miniature
parent8e08d415f9473b6b72fef698729453e726da16e7 (diff)
downloadPeerTube-2989628b7913383b39ac34c7db8666a21f8e5037.tar.gz
PeerTube-2989628b7913383b39ac34c7db8666a21f8e5037.tar.zst
PeerTube-2989628b7913383b39ac34c7db8666a21f8e5037.zip
Use HTML config when possible
Diffstat (limited to 'client/src/app/shared/shared-video-miniature')
-rw-r--r--client/src/app/shared/shared-video-miniature/abstract-video-list.ts8
-rw-r--r--client/src/app/shared/shared-video-miniature/video-miniature.component.ts12
2 files changed, 7 insertions, 13 deletions
diff --git a/client/src/app/shared/shared-video-miniature/abstract-video-list.ts b/client/src/app/shared/shared-video-miniature/abstract-video-list.ts
index f83380513..bf433aabd 100644
--- a/client/src/app/shared/shared-video-miniature/abstract-video-list.ts
+++ b/client/src/app/shared/shared-video-miniature/abstract-video-list.ts
@@ -25,7 +25,7 @@ import {
25import { DisableForReuseHook } from '@app/core/routing/disable-for-reuse-hook' 25import { DisableForReuseHook } from '@app/core/routing/disable-for-reuse-hook'
26import { GlobalIconName } from '@app/shared/shared-icons' 26import { GlobalIconName } from '@app/shared/shared-icons'
27import { isLastMonth, isLastWeek, isThisMonth, isToday, isYesterday } from '@shared/core-utils/miscs/date' 27import { isLastMonth, isLastWeek, isThisMonth, isToday, isYesterday } from '@shared/core-utils/miscs/date'
28import { ServerConfig, UserRight, VideoFilter, VideoSortField } from '@shared/models' 28import { HTMLServerConfig, UserRight, VideoFilter, VideoSortField } from '@shared/models'
29import { NSFWPolicyType } from '@shared/models/videos/nsfw-policy.type' 29import { NSFWPolicyType } from '@shared/models/videos/nsfw-policy.type'
30import { Syndication, Video } from '../shared-main' 30import { Syndication, Video } from '../shared-main'
31import { GenericHeaderComponent, VideoListHeaderComponent } from './video-list-header.component' 31import { GenericHeaderComponent, VideoListHeaderComponent } from './video-list-header.component'
@@ -100,7 +100,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, AfterConte
100 100
101 protected onUserLoadedSubject = new ReplaySubject<void>(1) 101 protected onUserLoadedSubject = new ReplaySubject<void>(1)
102 102
103 protected serverConfig: ServerConfig 103 protected serverConfig: HTMLServerConfig
104 104
105 protected abstract notifier: Notifier 105 protected abstract notifier: Notifier
106 protected abstract authService: AuthService 106 protected abstract authService: AuthService
@@ -126,9 +126,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, AfterConte
126 abstract generateSyndicationList (): void 126 abstract generateSyndicationList (): void
127 127
128 ngOnInit () { 128 ngOnInit () {
129 this.serverConfig = this.serverService.getTmpConfig() 129 this.serverConfig = this.serverService.getHTMLConfig()
130 this.serverService.getConfig()
131 .subscribe(config => this.serverConfig = config)
132 130
133 this.groupedDateLabels = { 131 this.groupedDateLabels = {
134 [GroupDate.UNKNOWN]: null, 132 [GroupDate.UNKNOWN]: null,
diff --git a/client/src/app/shared/shared-video-miniature/video-miniature.component.ts b/client/src/app/shared/shared-video-miniature/video-miniature.component.ts
index aac55a6e9..fc066846a 100644
--- a/client/src/app/shared/shared-video-miniature/video-miniature.component.ts
+++ b/client/src/app/shared/shared-video-miniature/video-miniature.component.ts
@@ -11,7 +11,7 @@ import {
11 Output 11 Output
12} from '@angular/core' 12} from '@angular/core'
13import { AuthService, ScreenService, ServerService, User } from '@app/core' 13import { AuthService, ScreenService, ServerService, User } from '@app/core'
14import { ServerConfig, VideoPlaylistType, VideoPrivacy, VideoState } from '@shared/models' 14import { HTMLServerConfig, VideoPlaylistType, VideoPrivacy, VideoState } from '@shared/models'
15import { ActorAvatarSize } from '../shared-actor-image/actor-avatar.component' 15import { ActorAvatarSize } from '../shared-actor-image/actor-avatar.component'
16import { Video } from '../shared-main' 16import { Video } from '../shared-main'
17import { VideoPlaylistService } from '../shared-video-playlist' 17import { VideoPlaylistService } from '../shared-video-playlist'
@@ -74,7 +74,7 @@ export class VideoMiniatureComponent implements OnInit {
74 mute: true 74 mute: true
75 } 75 }
76 showActions = false 76 showActions = false
77 serverConfig: ServerConfig 77 serverConfig: HTMLServerConfig
78 78
79 addToWatchLaterText: string 79 addToWatchLaterText: string
80 addedToWatchLaterText: string 80 addedToWatchLaterText: string
@@ -106,12 +106,8 @@ export class VideoMiniatureComponent implements OnInit {
106 } 106 }
107 107
108 ngOnInit () { 108 ngOnInit () {
109 this.serverConfig = this.serverService.getTmpConfig() 109 this.serverConfig = this.serverService.getHTMLConfig()
110 this.serverService.getConfig() 110 this.buildVideoLink()
111 .subscribe(config => {
112 this.serverConfig = config
113 this.buildVideoLink()
114 })
115 111
116 this.setUpBy() 112 this.setUpBy()
117 113