diff options
Diffstat (limited to 'client/src/app/app.module.ts')
-rw-r--r-- | client/src/app/app.module.ts | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts index cae99786b..77d68a4ec 100644 --- a/client/src/app/app.module.ts +++ b/client/src/app/app.module.ts | |||
@@ -1,6 +1,7 @@ | |||
1 | import { NgModule } from '@angular/core' | 1 | import { NgModule } from '@angular/core' |
2 | import { BrowserModule } from '@angular/platform-browser' | 2 | import { BrowserModule } from '@angular/platform-browser' |
3 | import { AboutModule } from '@app/about' | 3 | import { AboutModule } from '@app/about' |
4 | import { ServerService } from '@app/core' | ||
4 | import { ResetPasswordModule } from '@app/reset-password' | 5 | import { ResetPasswordModule } from '@app/reset-password' |
5 | 6 | ||
6 | import { MetaLoader, MetaModule, MetaStaticLoader, PageTitlePositioning } from '@ngx-meta/core' | 7 | import { MetaLoader, MetaModule, MetaStaticLoader, PageTitlePositioning } from '@ngx-meta/core' |
@@ -17,15 +18,14 @@ import { SharedModule } from './shared' | |||
17 | import { SignupModule } from './signup' | 18 | import { SignupModule } from './signup' |
18 | import { VideosModule } from './videos' | 19 | import { VideosModule } from './videos' |
19 | 20 | ||
20 | export function metaFactory (): MetaLoader { | 21 | export function metaFactory (serverService: ServerService): MetaLoader { |
21 | return new MetaStaticLoader({ | 22 | return new MetaStaticLoader({ |
22 | pageTitlePositioning: PageTitlePositioning.PrependPageTitle, | 23 | pageTitlePositioning: PageTitlePositioning.PrependPageTitle, |
23 | pageTitleSeparator: ' - ', | 24 | pageTitleSeparator: ' - ', |
24 | applicationName: 'PeerTube', | 25 | get applicationName () { return serverService.getConfig().instance.name }, |
25 | defaults: { | 26 | defaults: { |
26 | title: 'PeerTube', | 27 | get title () { return serverService.getConfig().instance.name }, |
27 | description: 'PeerTube, a federated (ActivityPub) video streaming platform ' + | 28 | get description () { return serverService.getConfig().instance.shortDescription } |
28 | 'using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular. ' | ||
29 | } | 29 | } |
30 | }) | 30 | }) |
31 | } | 31 | } |
@@ -57,7 +57,8 @@ export function metaFactory (): MetaLoader { | |||
57 | 57 | ||
58 | MetaModule.forRoot({ | 58 | MetaModule.forRoot({ |
59 | provide: MetaLoader, | 59 | provide: MetaLoader, |
60 | useFactory: (metaFactory) | 60 | useFactory: (metaFactory), |
61 | deps: [ ServerService ] | ||
61 | }) | 62 | }) |
62 | ], | 63 | ], |
63 | providers: [ ] | 64 | providers: [ ] |