diff options
Diffstat (limited to 'client/src/app/shared/video/abstract-video-list.ts')
-rw-r--r-- | client/src/app/shared/video/abstract-video-list.ts | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts index 2926b179b..faeea27d9 100644 --- a/client/src/app/shared/video/abstract-video-list.ts +++ b/client/src/app/shared/video/abstract-video-list.ts | |||
@@ -13,7 +13,7 @@ import { Notifier, ServerService } from '@app/core' | |||
13 | import { DisableForReuseHook } from '@app/core/routing/disable-for-reuse-hook' | 13 | import { DisableForReuseHook } from '@app/core/routing/disable-for-reuse-hook' |
14 | import { I18n } from '@ngx-translate/i18n-polyfill' | 14 | import { I18n } from '@ngx-translate/i18n-polyfill' |
15 | import { isLastMonth, isLastWeek, isToday, isYesterday } from '@shared/core-utils/miscs/date' | 15 | import { isLastMonth, isLastWeek, isToday, isYesterday } from '@shared/core-utils/miscs/date' |
16 | import { ResultList } from '@shared/models' | 16 | import { ResultList, ServerConfig } from '@shared/models' |
17 | 17 | ||
18 | enum GroupDate { | 18 | enum GroupDate { |
19 | UNKNOWN = 0, | 19 | UNKNOWN = 0, |
@@ -61,6 +61,8 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableFor | |||
61 | 61 | ||
62 | onDataSubject = new Subject<any[]>() | 62 | onDataSubject = new Subject<any[]>() |
63 | 63 | ||
64 | protected serverConfig: ServerConfig | ||
65 | |||
64 | protected abstract notifier: Notifier | 66 | protected abstract notifier: Notifier |
65 | protected abstract authService: AuthService | 67 | protected abstract authService: AuthService |
66 | protected abstract route: ActivatedRoute | 68 | protected abstract route: ActivatedRoute |
@@ -85,6 +87,10 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableFor | |||
85 | } | 87 | } |
86 | 88 | ||
87 | ngOnInit () { | 89 | ngOnInit () { |
90 | this.serverConfig = this.serverService.getTmpConfig() | ||
91 | this.serverService.getConfig() | ||
92 | .subscribe(config => this.serverConfig = config) | ||
93 | |||
88 | this.groupedDateLabels = { | 94 | this.groupedDateLabels = { |
89 | [GroupDate.UNKNOWN]: null, | 95 | [GroupDate.UNKNOWN]: null, |
90 | [GroupDate.TODAY]: this.i18n('Today'), | 96 | [GroupDate.TODAY]: this.i18n('Today'), |
@@ -251,7 +257,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableFor | |||
251 | } | 257 | } |
252 | 258 | ||
253 | let path = this.router.url | 259 | let path = this.router.url |
254 | if (!path || path === '/') path = this.serverService.getConfig().instance.defaultClientRoute | 260 | if (!path || path === '/') path = this.serverConfig.instance.defaultClientRoute |
255 | 261 | ||
256 | this.router.navigate([ path ], { queryParams, replaceUrl: true, queryParamsHandling: 'merge' }) | 262 | this.router.navigate([ path ], { queryParams, replaceUrl: true, queryParamsHandling: 'merge' }) |
257 | } | 263 | } |