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'
17 const myAccountRoutes: Routes = [
20 component: MyAccountComponent,
21 canActivateChild: [ MetaGuard, LoginGuard ],
25 redirectTo: 'settings',
30 component: MyAccountSettingsComponent,
33 title: 'Account settings'
38 path: 'video-channels',
39 component: MyAccountVideoChannelsComponent,
42 title: 'Account video channels'
47 path: 'video-channels/create',
48 component: MyAccountVideoChannelCreateComponent,
51 title: 'Create new video channel'
56 path: 'video-channels/update/:videoChannelId',
57 component: MyAccountVideoChannelUpdateComponent,
60 title: 'Update video channel'
66 component: MyAccountVideosComponent,
69 title: 'Account videos'
74 path: 'video-imports',
75 component: MyAccountVideoImportsComponent,
78 title: 'Account video imports'
83 path: 'subscriptions',
84 component: MyAccountSubscriptionsComponent,
87 title: 'Account subscriptions'
93 component: MyAccountOwnershipComponent,
96 title: 'Ownership changes'
101 path: 'blocklist/accounts',
102 component: MyAccountBlocklistComponent,
105 title: 'Muted accounts'
110 path: 'blocklist/servers',
111 component: MyAccountServerBlocklistComponent,
114 title: 'Muted instances'
123 imports: [ RouterModule.forChild(myAccountRoutes) ],
124 exports: [ RouterModule ]
126 export class MyAccountRoutingModule {}