From: Chocobozzz Date: Wed, 9 May 2018 07:26:41 +0000 (+0200) Subject: Load my-account module lazily X-Git-Tag: v1.0.0-beta.5~60 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=62e62f118d5da57acd3494fece2e8ed357564ffe;p=github%2FChocobozzz%2FPeerTube.git Load my-account module lazily --- diff --git a/client/src/app/my-account/index.ts b/client/src/app/+my-account/index.ts similarity index 100% rename from client/src/app/my-account/index.ts rename to client/src/app/+my-account/index.ts diff --git a/client/src/app/my-account/my-account-routing.module.ts b/client/src/app/+my-account/my-account-routing.module.ts similarity index 79% rename from client/src/app/my-account/my-account-routing.module.ts rename to client/src/app/+my-account/my-account-routing.module.ts index 96f52c1da..7e19cd994 100644 --- a/client/src/app/my-account/my-account-routing.module.ts +++ b/client/src/app/+my-account/my-account-routing.module.ts @@ -5,13 +5,13 @@ import { LoginGuard } from '../core' import { MyAccountComponent } from './my-account.component' import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component' import { MyAccountVideosComponent } from './my-account-videos/my-account-videos.component' -import { MyAccountVideoChannelsComponent } from '@app/my-account/my-account-video-channels/my-account-video-channels.component' -import { MyAccountVideoChannelCreateComponent } from '@app/my-account/my-account-video-channels/my-account-video-channel-create.component' -import { MyAccountVideoChannelUpdateComponent } from '@app/my-account/my-account-video-channels/my-account-video-channel-update.component' +import { MyAccountVideoChannelsComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channels.component' +import { MyAccountVideoChannelCreateComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channel-create.component' +import { MyAccountVideoChannelUpdateComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channel-update.component' const myAccountRoutes: Routes = [ { - path: 'my-account', + path: '', component: MyAccountComponent, canActivateChild: [ MetaGuard, LoginGuard ], children: [ diff --git a/client/src/app/my-account/my-account-settings/my-account-change-password/index.ts b/client/src/app/+my-account/my-account-settings/my-account-change-password/index.ts similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-change-password/index.ts rename to client/src/app/+my-account/my-account-settings/my-account-change-password/index.ts diff --git a/client/src/app/my-account/my-account-settings/my-account-change-password/my-account-change-password.component.html b/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.html similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-change-password/my-account-change-password.component.html rename to client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.html diff --git a/client/src/app/my-account/my-account-settings/my-account-change-password/my-account-change-password.component.scss b/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.scss similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-change-password/my-account-change-password.component.scss rename to client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.scss diff --git a/client/src/app/my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts b/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts rename to client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts diff --git a/client/src/app/my-account/my-account-settings/my-account-profile/index.ts b/client/src/app/+my-account/my-account-settings/my-account-profile/index.ts similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-profile/index.ts rename to client/src/app/+my-account/my-account-settings/my-account-profile/index.ts diff --git a/client/src/app/my-account/my-account-settings/my-account-profile/my-account-profile.component.html b/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.html similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-profile/my-account-profile.component.html rename to client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.html diff --git a/client/src/app/my-account/my-account-settings/my-account-profile/my-account-profile.component.scss b/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.scss similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-profile/my-account-profile.component.scss rename to client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.scss diff --git a/client/src/app/my-account/my-account-settings/my-account-profile/my-account-profile.component.ts b/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-profile/my-account-profile.component.ts rename to client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts diff --git a/client/src/app/my-account/my-account-settings/my-account-settings.component.html b/client/src/app/+my-account/my-account-settings/my-account-settings.component.html similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-settings.component.html rename to client/src/app/+my-account/my-account-settings/my-account-settings.component.html diff --git a/client/src/app/my-account/my-account-settings/my-account-settings.component.scss b/client/src/app/+my-account/my-account-settings/my-account-settings.component.scss similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-settings.component.scss rename to client/src/app/+my-account/my-account-settings/my-account-settings.component.scss diff --git a/client/src/app/my-account/my-account-settings/my-account-settings.component.ts b/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-settings.component.ts rename to client/src/app/+my-account/my-account-settings/my-account-settings.component.ts diff --git a/client/src/app/my-account/my-account-settings/my-account-video-settings/index.ts b/client/src/app/+my-account/my-account-settings/my-account-video-settings/index.ts similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-video-settings/index.ts rename to client/src/app/+my-account/my-account-settings/my-account-video-settings/index.ts diff --git a/client/src/app/my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.html b/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.html similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.html rename to client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.html diff --git a/client/src/app/my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.scss b/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.scss similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.scss rename to client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.scss diff --git a/client/src/app/my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts b/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts rename to client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts diff --git a/client/src/app/my-account/my-account-video-channels/my-account-video-channel-create.component.ts b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts similarity index 100% rename from client/src/app/my-account/my-account-video-channels/my-account-video-channel-create.component.ts rename to client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts diff --git a/client/src/app/my-account/my-account-video-channels/my-account-video-channel-edit.component.html b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.component.html similarity index 100% rename from client/src/app/my-account/my-account-video-channels/my-account-video-channel-edit.component.html rename to client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.component.html diff --git a/client/src/app/my-account/my-account-video-channels/my-account-video-channel-edit.component.scss b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.component.scss similarity index 100% rename from client/src/app/my-account/my-account-video-channels/my-account-video-channel-edit.component.scss rename to client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.component.scss diff --git a/client/src/app/my-account/my-account-video-channels/my-account-video-channel-edit.ts b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.ts similarity index 100% rename from client/src/app/my-account/my-account-video-channels/my-account-video-channel-edit.ts rename to client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.ts diff --git a/client/src/app/my-account/my-account-video-channels/my-account-video-channel-update.component.ts b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts similarity index 100% rename from client/src/app/my-account/my-account-video-channels/my-account-video-channel-update.component.ts rename to client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts diff --git a/client/src/app/my-account/my-account-video-channels/my-account-video-channels.component.html b/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.html similarity index 100% rename from client/src/app/my-account/my-account-video-channels/my-account-video-channels.component.html rename to client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.html diff --git a/client/src/app/my-account/my-account-video-channels/my-account-video-channels.component.scss b/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.scss similarity index 100% rename from client/src/app/my-account/my-account-video-channels/my-account-video-channels.component.scss rename to client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.scss diff --git a/client/src/app/my-account/my-account-video-channels/my-account-video-channels.component.ts b/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts similarity index 100% rename from client/src/app/my-account/my-account-video-channels/my-account-video-channels.component.ts rename to client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts diff --git a/client/src/app/my-account/my-account-videos/my-account-videos.component.html b/client/src/app/+my-account/my-account-videos/my-account-videos.component.html similarity index 100% rename from client/src/app/my-account/my-account-videos/my-account-videos.component.html rename to client/src/app/+my-account/my-account-videos/my-account-videos.component.html diff --git a/client/src/app/my-account/my-account-videos/my-account-videos.component.scss b/client/src/app/+my-account/my-account-videos/my-account-videos.component.scss similarity index 100% rename from client/src/app/my-account/my-account-videos/my-account-videos.component.scss rename to client/src/app/+my-account/my-account-videos/my-account-videos.component.scss diff --git a/client/src/app/my-account/my-account-videos/my-account-videos.component.ts b/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts similarity index 100% rename from client/src/app/my-account/my-account-videos/my-account-videos.component.ts rename to client/src/app/+my-account/my-account-videos/my-account-videos.component.ts diff --git a/client/src/app/my-account/my-account.component.html b/client/src/app/+my-account/my-account.component.html similarity index 100% rename from client/src/app/my-account/my-account.component.html rename to client/src/app/+my-account/my-account.component.html diff --git a/client/src/app/my-account/my-account.component.ts b/client/src/app/+my-account/my-account.component.ts similarity index 100% rename from client/src/app/my-account/my-account.component.ts rename to client/src/app/+my-account/my-account.component.ts diff --git a/client/src/app/my-account/my-account.module.ts b/client/src/app/+my-account/my-account.module.ts similarity index 68% rename from client/src/app/my-account/my-account.module.ts rename to client/src/app/+my-account/my-account.module.ts index ba9dea71e..7e6b8c03e 100644 --- a/client/src/app/my-account/my-account.module.ts +++ b/client/src/app/+my-account/my-account.module.ts @@ -6,10 +6,10 @@ import { MyAccountVideoSettingsComponent } from './my-account-settings/my-accoun import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component' import { MyAccountComponent } from './my-account.component' import { MyAccountVideosComponent } from './my-account-videos/my-account-videos.component' -import { MyAccountProfileComponent } from '@app/my-account/my-account-settings/my-account-profile/my-account-profile.component' -import { MyAccountVideoChannelsComponent } from '@app/my-account/my-account-video-channels/my-account-video-channels.component' -import { MyAccountVideoChannelCreateComponent } from '@app/my-account/my-account-video-channels/my-account-video-channel-create.component' -import { MyAccountVideoChannelUpdateComponent } from '@app/my-account/my-account-video-channels/my-account-video-channel-update.component' +import { MyAccountProfileComponent } from '@app/+my-account/my-account-settings/my-account-profile/my-account-profile.component' +import { MyAccountVideoChannelsComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channels.component' +import { MyAccountVideoChannelCreateComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channel-create.component' +import { MyAccountVideoChannelUpdateComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channel-update.component' @NgModule({ imports: [ diff --git a/client/src/app/app-routing.module.ts b/client/src/app/app-routing.module.ts index 799748cfa..936912d28 100644 --- a/client/src/app/app-routing.module.ts +++ b/client/src/app/app-routing.module.ts @@ -8,6 +8,10 @@ const routes: Routes = [ path: 'admin', loadChildren: './+admin/admin.module#AdminModule' }, + { + path: 'my-account', + loadChildren: './+my-account/my-account.module#MyAccountModule' + }, { path: 'accounts', loadChildren: './+accounts/accounts.module#AccountsModule' diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts index c22632fb8..f0d2be279 100644 --- a/client/src/app/app.module.ts +++ b/client/src/app/app.module.ts @@ -6,8 +6,6 @@ import { ResetPasswordModule } from '@app/reset-password' import { MetaLoader, MetaModule, MetaStaticLoader, PageTitlePositioning } from '@ngx-meta/core' -import { MyAccountModule } from './my-account' - import { AppRoutingModule } from './app-routing.module' import { AppComponent } from './app.component' import { CoreModule } from './core' @@ -46,7 +44,6 @@ export function metaFactory (serverService: ServerService): MetaLoader { AppRoutingModule, - MyAccountModule, CoreModule, LoginModule, ResetPasswordModule,