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'
17 import { MyAccountNotificationsComponent } from '@app/+my-account/my-account-notifications/my-account-notifications.component'
19 const myAccountRoutes: Routes = [
22 component: MyAccountComponent,
23 canActivateChild: [ MetaGuard, LoginGuard ],
27 redirectTo: 'settings',
32 component: MyAccountSettingsComponent,
35 title: 'Account settings'
40 path: 'video-channels',
41 component: MyAccountVideoChannelsComponent,
44 title: 'Account video channels'
49 path: 'video-channels/create',
50 component: MyAccountVideoChannelCreateComponent,
53 title: 'Create new video channel'
58 path: 'video-channels/update/:videoChannelId',
59 component: MyAccountVideoChannelUpdateComponent,
62 title: 'Update video channel'
68 component: MyAccountVideosComponent,
71 title: 'Account videos'
76 path: 'video-imports',
77 component: MyAccountVideoImportsComponent,
80 title: 'Account video imports'
85 path: 'subscriptions',
86 component: MyAccountSubscriptionsComponent,
89 title: 'Account subscriptions'
95 component: MyAccountOwnershipComponent,
98 title: 'Ownership changes'
103 path: 'blocklist/accounts',
104 component: MyAccountBlocklistComponent,
107 title: 'Muted accounts'
112 path: 'blocklist/servers',
113 component: MyAccountServerBlocklistComponent,
116 title: 'Muted instances'
121 path: 'history/videos',
122 component: MyAccountHistoryComponent,
125 title: 'Videos history'
130 path: 'notifications',
131 component: MyAccountNotificationsComponent,
134 title: 'Notifications'
143 imports: [ RouterModule.forChild(myAccountRoutes) ],
144 exports: [ RouterModule ]
146 export class MyAccountRoutingModule {}