aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-01-21 17:11:21 +0100
committerChocobozzz <me@florianbigard.com>2019-01-21 17:11:21 +0100
commit572b8e02e258bfa921032dee593d3c2f129852b6 (patch)
tree689708f7a7cc2d33f4261609f2170a644253de97 /client/src/app/videos
parent0c5892764e74f4a614f0087028e0687694b176d3 (diff)
downloadPeerTube-572b8e02e258bfa921032dee593d3c2f129852b6.tar.gz
PeerTube-572b8e02e258bfa921032dee593d3c2f129852b6.tar.zst
PeerTube-572b8e02e258bfa921032dee593d3c2f129852b6.zip
Fix trending days display on first load
Diffstat (limited to 'client/src/app/videos')
-rw-r--r--client/src/app/videos/video-list/video-trending.component.ts25
1 files changed, 14 insertions, 11 deletions
diff --git a/client/src/app/videos/video-list/video-trending.component.ts b/client/src/app/videos/video-list/video-trending.component.ts
index 881ab2174..6fd74e67a 100644
--- a/client/src/app/videos/video-list/video-trending.component.ts
+++ b/client/src/app/videos/video-list/video-trending.component.ts
@@ -39,18 +39,21 @@ export class VideoTrendingComponent extends AbstractVideoList implements OnInit,
39 39
40 this.generateSyndicationList() 40 this.generateSyndicationList()
41 41
42 const trendingDays = this.serverService.getConfig().trending.videos.intervalDays 42 this.serverService.configLoaded.subscribe(
43 () => {
44 const trendingDays = this.serverService.getConfig().trending.videos.intervalDays
43 45
44 if (trendingDays === 1) { 46 if (trendingDays === 1) {
45 this.titlePage = this.i18n('Trending for the last 24 hours') 47 this.titlePage = this.i18n('Trending for the last 24 hours')
46 this.titleTooltip = this.i18n('Trending videos are those totalizing the greatest number of views during the last 24 hours.') 48 this.titleTooltip = this.i18n('Trending videos are those totalizing the greatest number of views during the last 24 hours.')
47 } else { 49 } else {
48 this.titlePage = this.i18n('Trending for the last {{days}} days', { days: trendingDays }) 50 this.titlePage = this.i18n('Trending for the last {{days}} days', { days: trendingDays })
49 this.titleTooltip = this.i18n( 51 this.titleTooltip = this.i18n(
50 'Trending videos are those totalizing the greatest number of views during the last {{days}} days.', 52 'Trending videos are those totalizing the greatest number of views during the last {{days}} days.',
51 { days: trendingDays } 53 { days: trendingDays }
52 ) 54 )
53 } 55 }
56 })
54 } 57 }
55 58
56 ngOnDestroy () { 59 ngOnDestroy () {