X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fapp.module.ts;h=874fc43aa28cafdc1a2b177f7a00b323b6531693;hb=230de99e7146f75b0af056a42c54161597c03002;hp=ddcaf3f484db10a4d1937d0e5c2eb23873026540;hpb=ecb4e35f4e6c7304cb274593c13cb47fd5078b75;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts index ddcaf3f48..874fc43aa 100644 --- a/client/src/app/app.module.ts +++ b/client/src/app/app.module.ts @@ -1,10 +1,11 @@ import { NgModule } from '@angular/core' import { BrowserModule } from '@angular/platform-browser' +import { AboutModule } from '@app/about' +import { ServerService } from '@app/core' import { ResetPasswordModule } from '@app/reset-password' import { MetaLoader, MetaModule, MetaStaticLoader, PageTitlePositioning } from '@ngx-meta/core' - -import { AccountModule } from './account' +import { ClipboardModule } from 'ngx-clipboard' import { AppRoutingModule } from './app-routing.module' import { AppComponent } from './app.component' @@ -16,14 +17,14 @@ import { SharedModule } from './shared' import { SignupModule } from './signup' import { VideosModule } from './videos' -export function metaFactory (): MetaLoader { +export function metaFactory (serverService: ServerService): MetaLoader { return new MetaStaticLoader({ pageTitlePositioning: PageTitlePositioning.PrependPageTitle, pageTitleSeparator: ' - ', - applicationName: 'PeerTube', + get applicationName () { return serverService.getConfig().instance.name }, defaults: { - title: 'PeerTube', - description: 'PeerTube, a decentralized video streaming platform using P2P (BitTorrent) directly in the web browser' + get title () { return serverService.getConfig().instance.name }, + get description () { return serverService.getConfig().instance.shortDescription } } }) } @@ -38,23 +39,26 @@ export function metaFactory (): MetaLoader { ], imports: [ BrowserModule, + // FIXME: https://github.com/maxisam/ngx-clipboard/issues/133 + ClipboardModule, CoreModule, SharedModule, AppRoutingModule, - AccountModule, CoreModule, LoginModule, ResetPasswordModule, SignupModule, SharedModule, VideosModule, + AboutModule, MetaModule.forRoot({ provide: MetaLoader, - useFactory: (metaFactory) + useFactory: (metaFactory), + deps: [ ServerService ] }) ], providers: [ ]