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'
19 import { MyAccountAbusesListComponent } from './my-account-abuses/my-account-abuses-list.component'
21 const myAccountRoutes: Routes = [
24 component: MyAccountComponent,
25 canActivateChild: [ MetaGuard, LoginGuard ],
29 redirectTo: 'settings',
34 component: MyAccountSettingsComponent,
37 title: 'Account settings'
43 path: 'video-channels',
45 return import('./+my-account-video-channels/my-account-video-channels.module')
46 .then(m => m.MyAccountVideoChannelsModule)
51 path: 'video-playlists',
52 component: MyAccountVideoPlaylistsComponent,
55 title: 'Account playlists'
60 path: 'video-playlists/create',
61 component: MyAccountVideoPlaylistCreateComponent,
64 title: 'Create new playlist'
69 path: 'video-playlists/:videoPlaylistId',
70 component: MyAccountVideoPlaylistElementsComponent,
73 title: 'Playlist elements'
78 path: 'video-playlists/update/:videoPlaylistId',
79 component: MyAccountVideoPlaylistUpdateComponent,
82 title: 'Update playlist'
89 component: MyAccountVideosComponent,
92 title: 'Account videos'
96 key: 'my-account-videos-list'
101 path: 'video-imports',
102 component: MyAccountVideoImportsComponent,
105 title: 'Account video imports'
110 path: 'subscriptions',
111 component: MyAccountSubscriptionsComponent,
114 title: 'Account subscriptions'
120 component: MyAccountOwnershipComponent,
123 title: 'Ownership changes'
128 path: 'blocklist/accounts',
129 component: MyAccountBlocklistComponent,
132 title: 'Muted accounts'
137 path: 'blocklist/servers',
138 component: MyAccountServerBlocklistComponent,
141 title: 'Muted servers'
146 path: 'history/videos',
147 component: MyAccountHistoryComponent,
150 title: 'Videos history'
154 key: 'my-videos-history-list'
159 path: 'notifications',
160 component: MyAccountNotificationsComponent,
163 title: 'Notifications'
169 component: MyAccountAbusesListComponent,
172 title: 'My abuse reports'
181 imports: [ RouterModule.forChild(myAccountRoutes) ],
182 exports: [ RouterModule ]
184 export class MyAccountRoutingModule {}