1 import { NgModule } from '@angular/core'
2 import { RouterModule, Routes } from '@angular/router'
3 import { MetaGuard } from '@ngx-meta/core'
4 import { LoginGuard } from '../core'
5 import { MyAccountComponent } from './my-account.component'
6 import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component'
7 import { MyAccountVideosComponent } from './my-account-videos/my-account-videos.component'
8 import { MyAccountVideoChannelsComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channels.component'
9 import { MyAccountVideoChannelCreateComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channel-create.component'
10 import { MyAccountVideoChannelUpdateComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channel-update.component'
11 import { MyAccountVideoImportsComponent } from '@app/+my-account/my-account-video-imports/my-account-video-imports.component'
12 import { MyAccountSubscriptionsComponent } from '@app/+my-account/my-account-subscriptions/my-account-subscriptions.component'
13 import { MyAccountOwnershipComponent } from '@app/+my-account/my-account-ownership/my-account-ownership.component'
14 import { MyAccountBlocklistComponent } from '@app/+my-account/my-account-blocklist/my-account-blocklist.component'
15 import { MyAccountServerBlocklistComponent } from '@app/+my-account/my-account-blocklist/my-account-server-blocklist.component'
16 import { MyAccountHistoryComponent } from '@app/+my-account/my-account-history/my-account-history.component'
18 const myAccountRoutes: Routes = [
21 component: MyAccountComponent,
22 canActivateChild: [ MetaGuard, LoginGuard ],
26 redirectTo: 'settings',
31 component: MyAccountSettingsComponent,
34 title: 'Account settings'
39 path: 'video-channels',
40 component: MyAccountVideoChannelsComponent,
43 title: 'Account video channels'
48 path: 'video-channels/create',
49 component: MyAccountVideoChannelCreateComponent,
52 title: 'Create new video channel'
57 path: 'video-channels/update/:videoChannelId',
58 component: MyAccountVideoChannelUpdateComponent,
61 title: 'Update video channel'
67 component: MyAccountVideosComponent,
70 title: 'Account videos'
75 path: 'video-imports',
76 component: MyAccountVideoImportsComponent,
79 title: 'Account video imports'
84 path: 'subscriptions',
85 component: MyAccountSubscriptionsComponent,
88 title: 'Account subscriptions'
94 component: MyAccountOwnershipComponent,
97 title: 'Ownership changes'
102 path: 'blocklist/accounts',
103 component: MyAccountBlocklistComponent,
106 title: 'Muted accounts'
111 path: 'blocklist/servers',
112 component: MyAccountServerBlocklistComponent,
115 title: 'Muted instances'
120 path: 'history/videos',
121 component: MyAccountHistoryComponent,
124 title: 'Videos history'
133 imports: [ RouterModule.forChild(myAccountRoutes) ],
134 exports: [ RouterModule ]
136 export class MyAccountRoutingModule {}