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 { MyAccountBlocklistComponent } from './my-account-blocklist/my-account-blocklist.component'
6 import { MyAccountServerBlocklistComponent } from './my-account-blocklist/my-account-server-blocklist.component'
7 import { MyAccountHistoryComponent } from './my-account-history/my-account-history.component'
8 import { MyAccountNotificationsComponent } from './my-account-notifications/my-account-notifications.component'
9 import { MyAccountOwnershipComponent } from './my-account-ownership/my-account-ownership.component'
10 import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component'
11 import { MyAccountSubscriptionsComponent } from './my-account-subscriptions/my-account-subscriptions.component'
12 import { MyAccountVideoImportsComponent } from './my-account-video-imports/my-account-video-imports.component'
13 import { MyAccountVideoPlaylistCreateComponent } from './my-account-video-playlists/my-account-video-playlist-create.component'
14 import { MyAccountVideoPlaylistElementsComponent } from './my-account-video-playlists/my-account-video-playlist-elements.component'
15 import { MyAccountVideoPlaylistUpdateComponent } from './my-account-video-playlists/my-account-video-playlist-update.component'
16 import { MyAccountVideoPlaylistsComponent } from './my-account-video-playlists/my-account-video-playlists.component'
17 import { MyAccountVideosComponent } from './my-account-videos/my-account-videos.component'
18 import { MyAccountComponent } from './my-account.component'
20 const myAccountRoutes: Routes = [
23 component: MyAccountComponent,
24 canActivateChild: [ MetaGuard, LoginGuard ],
28 redirectTo: 'settings',
33 component: MyAccountSettingsComponent,
36 title: 'Account settings'
42 path: 'video-channels',
44 return import('./+my-account-video-channels/my-account-video-channels.module')
45 .then(m => m.MyAccountVideoChannelsModule)
50 path: 'video-playlists',
51 component: MyAccountVideoPlaylistsComponent,
54 title: 'Account playlists'
59 path: 'video-playlists/create',
60 component: MyAccountVideoPlaylistCreateComponent,
63 title: 'Create new playlist'
68 path: 'video-playlists/:videoPlaylistId',
69 component: MyAccountVideoPlaylistElementsComponent,
72 title: 'Playlist elements'
77 path: 'video-playlists/update/:videoPlaylistId',
78 component: MyAccountVideoPlaylistUpdateComponent,
81 title: 'Update playlist'
88 component: MyAccountVideosComponent,
91 title: 'Account videos'
95 key: 'my-account-videos-list'
100 path: 'video-imports',
101 component: MyAccountVideoImportsComponent,
104 title: 'Account video imports'
109 path: 'subscriptions',
110 component: MyAccountSubscriptionsComponent,
113 title: 'Account subscriptions'
119 component: MyAccountOwnershipComponent,
122 title: 'Ownership changes'
127 path: 'blocklist/accounts',
128 component: MyAccountBlocklistComponent,
131 title: 'Muted accounts'
136 path: 'blocklist/servers',
137 component: MyAccountServerBlocklistComponent,
140 title: 'Muted servers'
145 path: 'history/videos',
146 component: MyAccountHistoryComponent,
149 title: 'Videos history'
153 key: 'my-videos-history-list'
158 path: 'notifications',
159 component: MyAccountNotificationsComponent,
162 title: 'Notifications'
171 imports: [ RouterModule.forChild(myAccountRoutes) ],
172 exports: [ RouterModule ]
174 export class MyAccountRoutingModule {}