diff options
author | Chocobozzz <me@florianbigard.com> | 2018-03-22 14:13:30 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-03-22 14:14:31 +0100 |
commit | 63ac2857aa6550232a1727a395c40e722c32710d (patch) | |
tree | 837ce7d32cc99b1ac476678f6f73a4bff832d8c3 /client/src/app/app.module.ts | |
parent | 0c49373af9c3eaf307581c2608d3f378ca447b11 (diff) | |
download | PeerTube-63ac2857aa6550232a1727a395c40e722c32710d.tar.gz PeerTube-63ac2857aa6550232a1727a395c40e722c32710d.tar.zst PeerTube-63ac2857aa6550232a1727a395c40e722c32710d.zip |
Use instance name for page titles
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: [ ] |