aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared
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
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')
-rw-r--r--client/src/app/shared/shared-actor-image-edit/actor-avatar-edit.component.ts15
-rw-r--r--client/src/app/shared/shared-actor-image-edit/actor-banner-edit.component.ts15
-rw-r--r--client/src/app/shared/shared-forms/preview-upload.component.ts8
-rw-r--r--client/src/app/shared/shared-instance/instance-features-table.component.html2
-rw-r--r--client/src/app/shared/shared-instance/instance-features-table.component.ts1
-rw-r--r--client/src/app/shared/shared-main/video/video.model.ts6
-rw-r--r--client/src/app/shared/shared-moderation/user-moderation-dropdown.component.ts13
-rw-r--r--client/src/app/shared/shared-user-settings/user-interface-settings.component.ts8
-rw-r--r--client/src/app/shared/shared-user-settings/user-video-settings.component.ts6
-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
-rw-r--r--client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts11
12 files changed, 40 insertions, 65 deletions
diff --git a/client/src/app/shared/shared-actor-image-edit/actor-avatar-edit.component.ts b/client/src/app/shared/shared-actor-image-edit/actor-avatar-edit.component.ts
index 840946690..dc9b72ddb 100644
--- a/client/src/app/shared/shared-actor-image-edit/actor-avatar-edit.component.ts
+++ b/client/src/app/shared/shared-actor-image-edit/actor-avatar-edit.component.ts
@@ -39,14 +39,13 @@ export class ActorAvatarEditComponent implements OnInit {
39 ) { } 39 ) { }
40 40
41 ngOnInit (): void { 41 ngOnInit (): void {
42 this.serverService.getConfig() 42 const config = this.serverService.getHTMLConfig()
43 .subscribe(config => { 43
44 this.maxAvatarSize = config.avatar.file.size.max 44 this.maxAvatarSize = config.avatar.file.size.max
45 this.avatarExtensions = config.avatar.file.extensions.join(', ') 45 this.avatarExtensions = config.avatar.file.extensions.join(', ')
46 46
47 this.avatarFormat = `${$localize`max size`}: 192*192px, ` + 47 this.avatarFormat = `${$localize`max size`}: 192*192px, ` +
48 `${getBytes(this.maxAvatarSize)} ${$localize`extensions`}: ${this.avatarExtensions}` 48 `${getBytes(this.maxAvatarSize)} ${$localize`extensions`}: ${this.avatarExtensions}`
49 })
50 } 49 }
51 50
52 onAvatarChange (input: HTMLInputElement) { 51 onAvatarChange (input: HTMLInputElement) {
diff --git a/client/src/app/shared/shared-actor-image-edit/actor-banner-edit.component.ts b/client/src/app/shared/shared-actor-image-edit/actor-banner-edit.component.ts
index 08372d8ad..eec325a61 100644
--- a/client/src/app/shared/shared-actor-image-edit/actor-banner-edit.component.ts
+++ b/client/src/app/shared/shared-actor-image-edit/actor-banner-edit.component.ts
@@ -1,4 +1,4 @@
1import { Component, ElementRef, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core' 1import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core'
2import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser' 2import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser'
3import { Notifier, ServerService } from '@app/core' 3import { Notifier, ServerService } from '@app/core'
4import { VideoChannel } from '@app/shared/shared-main' 4import { VideoChannel } from '@app/shared/shared-main'
@@ -36,16 +36,15 @@ export class ActorBannerEditComponent implements OnInit {
36 ) { } 36 ) { }
37 37
38 ngOnInit (): void { 38 ngOnInit (): void {
39 this.serverService.getConfig() 39 const config = this.serverService.getHTMLConfig()
40 .subscribe(config => { 40 this.maxBannerSize = config.banner.file.size.max
41 this.maxBannerSize = config.banner.file.size.max 41 this.bannerExtensions = config.banner.file.extensions.join(', ')
42 this.bannerExtensions = config.banner.file.extensions.join(', ')
43 42
44 // tslint:disable:max-line-length 43 // tslint:disable:max-line-length
45 this.bannerFormat = $localize`ratio 6/1, recommended size: 1920x317, max size: ${getBytes(this.maxBannerSize)}, extensions: ${this.bannerExtensions}` 44 this.bannerFormat = $localize`ratio 6/1, recommended size: 1920x317, max size: ${getBytes(this.maxBannerSize)}, extensions: ${this.bannerExtensions}`
46 })
47 } 45 }
48 46
47
49 onBannerChange (input: HTMLInputElement) { 48 onBannerChange (input: HTMLInputElement) {
50 this.bannerfileInput = new ElementRef(input) 49 this.bannerfileInput = new ElementRef(input)
51 50
diff --git a/client/src/app/shared/shared-forms/preview-upload.component.ts b/client/src/app/shared/shared-forms/preview-upload.component.ts
index a55dcdd9a..edee6786d 100644
--- a/client/src/app/shared/shared-forms/preview-upload.component.ts
+++ b/client/src/app/shared/shared-forms/preview-upload.component.ts
@@ -2,7 +2,7 @@ import { Component, forwardRef, Input, OnInit } from '@angular/core'
2import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' 2import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'
3import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser' 3import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser'
4import { ServerService } from '@app/core' 4import { ServerService } from '@app/core'
5import { ServerConfig } from '@shared/models' 5import { HTMLServerConfig } from '@shared/models'
6import { BytesPipe } from '../shared-main' 6import { BytesPipe } from '../shared-main'
7 7
8@Component({ 8@Component({
@@ -27,7 +27,7 @@ export class PreviewUploadComponent implements OnInit, ControlValueAccessor {
27 allowedExtensionsMessage = '' 27 allowedExtensionsMessage = ''
28 maxSizeText: string 28 maxSizeText: string
29 29
30 private serverConfig: ServerConfig 30 private serverConfig: HTMLServerConfig
31 private bytesPipe: BytesPipe 31 private bytesPipe: BytesPipe
32 private file: Blob 32 private file: Blob
33 33
@@ -52,9 +52,7 @@ export class PreviewUploadComponent implements OnInit, ControlValueAccessor {
52 } 52 }
53 53
54 ngOnInit () { 54 ngOnInit () {
55 this.serverConfig = this.serverService.getTmpConfig() 55 this.serverConfig = this.serverService.getHTMLConfig()
56 this.serverService.getConfig()
57 .subscribe(config => this.serverConfig = config)
58 56
59 this.allowedExtensionsMessage = this.videoImageExtensions.join(', ') 57 this.allowedExtensionsMessage = this.videoImageExtensions.join(', ')
60 } 58 }
diff --git a/client/src/app/shared/shared-instance/instance-features-table.component.html b/client/src/app/shared/shared-instance/instance-features-table.component.html
index d505b6739..3fc5920b5 100644
--- a/client/src/app/shared/shared-instance/instance-features-table.component.html
+++ b/client/src/app/shared/shared-instance/instance-features-table.component.html
@@ -1,4 +1,4 @@
1<div class="feature-table"> 1<div *ngIf="serverConfig" class="feature-table">
2 2
3 <table class="table" *ngIf="serverConfig"> 3 <table class="table" *ngIf="serverConfig">
4 <caption i18n>Features found on this instance</caption> 4 <caption i18n>Features found on this instance</caption>
diff --git a/client/src/app/shared/shared-instance/instance-features-table.component.ts b/client/src/app/shared/shared-instance/instance-features-table.component.ts
index c3b3dfdfd..6335de450 100644
--- a/client/src/app/shared/shared-instance/instance-features-table.component.ts
+++ b/client/src/app/shared/shared-instance/instance-features-table.component.ts
@@ -40,7 +40,6 @@ export class InstanceFeaturesTableComponent implements OnInit {
40 } 40 }
41 41
42 ngOnInit () { 42 ngOnInit () {
43 this.serverConfig = this.serverService.getTmpConfig()
44 this.serverService.getConfig() 43 this.serverService.getConfig()
45 .subscribe(config => { 44 .subscribe(config => {
46 this.serverConfig = config 45 this.serverConfig = config
diff --git a/client/src/app/shared/shared-main/video/video.model.ts b/client/src/app/shared/shared-main/video/video.model.ts
index e7f739bfe..ab8ed9051 100644
--- a/client/src/app/shared/shared-main/video/video.model.ts
+++ b/client/src/app/shared/shared-main/video/video.model.ts
@@ -1,13 +1,11 @@
1import { AuthUser } from '@app/core' 1import { AuthUser } from '@app/core'
2import { User } from '@app/core/users/user.model' 2import { User } from '@app/core/users/user.model'
3import { durationToString, getAbsoluteAPIUrl, getAbsoluteEmbedUrl } from '@app/helpers' 3import { durationToString, getAbsoluteAPIUrl, getAbsoluteEmbedUrl } from '@app/helpers'
4import { Account } from '@app/shared/shared-main/account/account.model'
5import { Actor } from '@app/shared/shared-main/account/actor.model' 4import { Actor } from '@app/shared/shared-main/account/actor.model'
6import { VideoChannel } from '@app/shared/shared-main/video-channel/video-channel.model'
7import { peertubeTranslate } from '@shared/core-utils/i18n' 5import { peertubeTranslate } from '@shared/core-utils/i18n'
8import { 6import {
9 ActorImage, 7 ActorImage,
10 ServerConfig, 8 HTMLServerConfig,
11 UserRight, 9 UserRight,
12 Video as VideoServerModel, 10 Video as VideoServerModel,
13 VideoConstant, 11 VideoConstant,
@@ -163,7 +161,7 @@ export class Video implements VideoServerModel {
163 this.pluginData = hash.pluginData 161 this.pluginData = hash.pluginData
164 } 162 }
165 163
166 isVideoNSFWForUser (user: User, serverConfig: ServerConfig) { 164 isVideoNSFWForUser (user: User, serverConfig: HTMLServerConfig) {
167 // Video is not NSFW, skip 165 // Video is not NSFW, skip
168 if (this.nsfw === false) return false 166 if (this.nsfw === false) return false
169 167
diff --git a/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.ts b/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.ts
index f510a82f9..8c5a48d42 100644
--- a/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.ts
+++ b/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.ts
@@ -1,7 +1,7 @@
1import { Component, EventEmitter, Input, OnChanges, OnInit, Output, ViewChild } from '@angular/core' 1import { Component, EventEmitter, Input, OnChanges, OnInit, Output, ViewChild } from '@angular/core'
2import { AuthService, ConfirmService, Notifier, ServerService, UserService } from '@app/core' 2import { AuthService, ConfirmService, Notifier, ServerService, UserService } from '@app/core'
3import { Account, DropdownAction } from '@app/shared/shared-main' 3import { Account, DropdownAction } from '@app/shared/shared-main'
4import { BulkRemoveCommentsOfBody, ServerConfig, User, UserRight } from '@shared/models' 4import { BulkRemoveCommentsOfBody, User, UserRight } from '@shared/models'
5import { BlocklistService } from './blocklist.service' 5import { BlocklistService } from './blocklist.service'
6import { BulkService } from './bulk.service' 6import { BulkService } from './bulk.service'
7import { UserBanModalComponent } from './user-ban-modal.component' 7import { UserBanModalComponent } from './user-ban-modal.component'
@@ -28,7 +28,7 @@ export class UserModerationDropdownComponent implements OnInit, OnChanges {
28 28
29 userActions: DropdownAction<{ user: User, account: Account }>[][] = [] 29 userActions: DropdownAction<{ user: User, account: Account }>[][] = []
30 30
31 private serverConfig: ServerConfig 31 requiresEmailVerification = false
32 32
33 constructor ( 33 constructor (
34 private authService: AuthService, 34 private authService: AuthService,
@@ -40,14 +40,9 @@ export class UserModerationDropdownComponent implements OnInit, OnChanges {
40 private bulkService: BulkService 40 private bulkService: BulkService
41 ) { } 41 ) { }
42 42
43 get requiresEmailVerification () { 43 ngOnInit () {
44 return this.serverConfig.signup.requiresEmailVerification
45 }
46
47 ngOnInit (): void {
48 this.serverConfig = this.serverService.getTmpConfig()
49 this.serverService.getConfig() 44 this.serverService.getConfig()
50 .subscribe(config => this.serverConfig = config) 45 .subscribe(config => this.requiresEmailVerification = config.signup.requiresEmailVerification)
51 } 46 }
52 47
53 ngOnChanges () { 48 ngOnChanges () {
diff --git a/client/src/app/shared/shared-user-settings/user-interface-settings.component.ts b/client/src/app/shared/shared-user-settings/user-interface-settings.component.ts
index 80b88c129..b721604e5 100644
--- a/client/src/app/shared/shared-user-settings/user-interface-settings.component.ts
+++ b/client/src/app/shared/shared-user-settings/user-interface-settings.component.ts
@@ -2,7 +2,7 @@ import { Subject, Subscription } from 'rxjs'
2import { Component, Input, OnDestroy, OnInit } from '@angular/core' 2import { Component, Input, OnDestroy, OnInit } from '@angular/core'
3import { AuthService, Notifier, ServerService, UserService } from '@app/core' 3import { AuthService, Notifier, ServerService, UserService } from '@app/core'
4import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' 4import { FormReactive, FormValidatorService } from '@app/shared/shared-forms'
5import { ServerConfig, User, UserUpdateMe } from '@shared/models' 5import { HTMLServerConfig, User, UserUpdateMe } from '@shared/models'
6 6
7@Component({ 7@Component({
8 selector: 'my-user-interface-settings', 8 selector: 'my-user-interface-settings',
@@ -17,7 +17,7 @@ export class UserInterfaceSettingsComponent extends FormReactive implements OnIn
17 17
18 formValuesWatcher: Subscription 18 formValuesWatcher: Subscription
19 19
20 private serverConfig: ServerConfig 20 private serverConfig: HTMLServerConfig
21 21
22 constructor ( 22 constructor (
23 protected formValidatorService: FormValidatorService, 23 protected formValidatorService: FormValidatorService,
@@ -35,9 +35,7 @@ export class UserInterfaceSettingsComponent extends FormReactive implements OnIn
35 } 35 }
36 36
37 ngOnInit () { 37 ngOnInit () {
38 this.serverConfig = this.serverService.getTmpConfig() 38 this.serverConfig = this.serverService.getHTMLConfig()
39 this.serverService.getConfig()
40 .subscribe(config => this.serverConfig = config)
41 39
42 this.buildForm({ 40 this.buildForm({
43 theme: null 41 theme: null
diff --git a/client/src/app/shared/shared-user-settings/user-video-settings.component.ts b/client/src/app/shared/shared-user-settings/user-video-settings.component.ts
index ae95030c7..8b0eaea4f 100644
--- a/client/src/app/shared/shared-user-settings/user-video-settings.component.ts
+++ b/client/src/app/shared/shared-user-settings/user-video-settings.component.ts
@@ -48,9 +48,8 @@ export class UserVideoSettingsComponent extends FormReactive implements OnInit,
48 48
49 forkJoin([ 49 forkJoin([
50 this.serverService.getVideoLanguages(), 50 this.serverService.getVideoLanguages(),
51 this.serverService.getConfig(),
52 this.userInformationLoaded.pipe(first()) 51 this.userInformationLoaded.pipe(first())
53 ]).subscribe(([ languages, config ]) => { 52 ]).subscribe(([ languages ]) => {
54 const group = this.allLanguagesGroup 53 const group = this.allLanguagesGroup
55 54
56 this.languageItems = [ { label: $localize`Unknown language`, id: '_unknown', group } ] 55 this.languageItems = [ { label: $localize`Unknown language`, id: '_unknown', group } ]
@@ -61,7 +60,8 @@ export class UserVideoSettingsComponent extends FormReactive implements OnInit,
61 ? this.user.videoLanguages.map(l => ({ id: l })) 60 ? this.user.videoLanguages.map(l => ({ id: l }))
62 : [ { group } ] 61 : [ { group } ]
63 62
64 this.defaultNSFWPolicy = config.instance.defaultNSFWPolicy 63 const serverConfig = this.serverService.getHTMLConfig()
64 this.defaultNSFWPolicy = serverConfig.instance.defaultNSFWPolicy
65 65
66 this.form.patchValue({ 66 this.form.patchValue({
67 nsfwPolicy: this.user.nsfwPolicy || this.defaultNSFWPolicy, 67 nsfwPolicy: this.user.nsfwPolicy || this.defaultNSFWPolicy,
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
diff --git a/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts b/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts
index 86c281a1e..57eab4dfd 100644
--- a/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts
+++ b/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts
@@ -2,7 +2,7 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, In
2import { AuthService, Notifier, ServerService } from '@app/core' 2import { AuthService, Notifier, ServerService } from '@app/core'
3import { Video } from '@app/shared/shared-main' 3import { Video } from '@app/shared/shared-main'
4import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap' 4import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap'
5import { ServerConfig, VideoPlaylistElementType, VideoPlaylistElementUpdate } from '@shared/models' 5import { HTMLServerConfig, VideoPlaylistElementType, VideoPlaylistElementUpdate } from '@shared/models'
6import { secondsToTime } from '../../../assets/player/utils' 6import { secondsToTime } from '../../../assets/player/utils'
7import { VideoPlaylistElement } from './video-playlist-element.model' 7import { VideoPlaylistElement } from './video-playlist-element.model'
8import { VideoPlaylist } from './video-playlist.model' 8import { VideoPlaylist } from './video-playlist.model'
@@ -37,7 +37,7 @@ export class VideoPlaylistElementMiniatureComponent implements OnInit {
37 stopTimestamp: number 37 stopTimestamp: number
38 } = {} as any 38 } = {} as any
39 39
40 private serverConfig: ServerConfig 40 private serverConfig: HTMLServerConfig
41 41
42 constructor ( 42 constructor (
43 private authService: AuthService, 43 private authService: AuthService,
@@ -48,12 +48,7 @@ export class VideoPlaylistElementMiniatureComponent implements OnInit {
48 ) {} 48 ) {}
49 49
50 ngOnInit (): void { 50 ngOnInit (): void {
51 this.serverConfig = this.serverService.getTmpConfig() 51 this.serverConfig = this.serverService.getHTMLConfig()
52 this.serverService.getConfig()
53 .subscribe(config => {
54 this.serverConfig = config
55 this.cdr.detectChanges()
56 })
57 } 52 }
58 53
59 isUnavailable (e: VideoPlaylistElement) { 54 isUnavailable (e: VideoPlaylistElement) {