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 { MyAccountVideoImportsComponent } from '@app/+my-account/my-account-video-imports/my-account-video-imports.component'
9 import { MyAccountSubscriptionsComponent } from '@app/+my-account/my-account-subscriptions/my-account-subscriptions.component'
10 import { MyAccountOwnershipComponent } from '@app/+my-account/my-account-ownership/my-account-ownership.component'
11 import { MyAccountBlocklistComponent } from '@app/+my-account/my-account-blocklist/my-account-blocklist.component'
12 import { MyAccountServerBlocklistComponent } from '@app/+my-account/my-account-blocklist/my-account-server-blocklist.component'
13 import { MyAccountHistoryComponent } from '@app/+my-account/my-account-history/my-account-history.component'
14 import { MyAccountNotificationsComponent } from '@app/+my-account/my-account-notifications/my-account-notifications.component'
15 import { MyAccountVideoPlaylistsComponent } from '@app/+my-account/my-account-video-playlists/my-account-video-playlists.component'
17 MyAccountVideoPlaylistCreateComponent
18 } from '@app/+my-account/my-account-video-playlists/my-account-video-playlist-create.component'
20 MyAccountVideoPlaylistUpdateComponent
21 } from '@app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component'
23 MyAccountVideoPlaylistElementsComponent
24 } from '@app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component'
26 const myAccountRoutes: Routes = [
29 component: MyAccountComponent,
30 canActivateChild: [ MetaGuard, LoginGuard ],
34 redirectTo: 'settings',
39 component: MyAccountSettingsComponent,
42 title: 'Account settings'
48 path: 'video-channels',
49 loadChildren: () => import('./my-account-video-channels/my-account-video-channels.module').then(m => m.MyAccountVideoChannelsModule)
53 path: 'video-playlists',
54 component: MyAccountVideoPlaylistsComponent,
57 title: 'Account playlists'
62 path: 'video-playlists/create',
63 component: MyAccountVideoPlaylistCreateComponent,
66 title: 'Create new playlist'
71 path: 'video-playlists/:videoPlaylistId',
72 component: MyAccountVideoPlaylistElementsComponent,
75 title: 'Playlist elements'
80 path: 'video-playlists/update/:videoPlaylistId',
81 component: MyAccountVideoPlaylistUpdateComponent,
84 title: 'Update playlist'
91 component: MyAccountVideosComponent,
94 title: 'Account videos'
98 key: 'my-account-videos-list'
103 path: 'video-imports',
104 component: MyAccountVideoImportsComponent,
107 title: 'Account video imports'
112 path: 'subscriptions',
113 component: MyAccountSubscriptionsComponent,
116 title: 'Account subscriptions'
122 component: MyAccountOwnershipComponent,
125 title: 'Ownership changes'
130 path: 'blocklist/accounts',
131 component: MyAccountBlocklistComponent,
134 title: 'Muted accounts'
139 path: 'blocklist/servers',
140 component: MyAccountServerBlocklistComponent,
143 title: 'Muted instances'
148 path: 'history/videos',
149 component: MyAccountHistoryComponent,
152 title: 'Videos history'
156 key: 'my-videos-history-list'
161 path: 'notifications',
162 component: MyAccountNotificationsComponent,
165 title: 'Notifications'
174 imports: [ RouterModule.forChild(myAccountRoutes) ],
175 exports: [ RouterModule ]
177 export class MyAccountRoutingModule {}