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'
18 import { MyAccountVideoPlaylistsComponent } from '@app/+my-account/my-account-video-playlists/my-account-video-playlists.component'
20 MyAccountVideoPlaylistCreateComponent
21 } from '@app/+my-account/my-account-video-playlists/my-account-video-playlist-create.component'
23 MyAccountVideoPlaylistUpdateComponent
24 } from '@app/+my-account/my-account-video-playlists/my-account-video-playlist-update.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 component: MyAccountVideoChannelsComponent,
52 title: 'Account video channels'
57 path: 'video-channels/create',
58 component: MyAccountVideoChannelCreateComponent,
61 title: 'Create new video channel'
66 path: 'video-channels/update/:videoChannelId',
67 component: MyAccountVideoChannelUpdateComponent,
70 title: 'Update video channel'
76 path: 'video-playlists',
77 component: MyAccountVideoPlaylistsComponent,
80 title: 'Account playlists'
85 path: 'video-playlists/create',
86 component: MyAccountVideoPlaylistCreateComponent,
89 title: 'Create new playlist'
94 path: 'video-playlists/update/:videoPlaylistId',
95 component: MyAccountVideoPlaylistUpdateComponent,
98 title: 'Update playlist'
105 component: MyAccountVideosComponent,
108 title: 'Account videos'
113 path: 'video-imports',
114 component: MyAccountVideoImportsComponent,
117 title: 'Account video imports'
122 path: 'subscriptions',
123 component: MyAccountSubscriptionsComponent,
126 title: 'Account subscriptions'
132 component: MyAccountOwnershipComponent,
135 title: 'Ownership changes'
140 path: 'blocklist/accounts',
141 component: MyAccountBlocklistComponent,
144 title: 'Muted accounts'
149 path: 'blocklist/servers',
150 component: MyAccountServerBlocklistComponent,
153 title: 'Muted instances'
158 path: 'history/videos',
159 component: MyAccountHistoryComponent,
162 title: 'Videos history'
167 path: 'notifications',
168 component: MyAccountNotificationsComponent,
171 title: 'Notifications'
180 imports: [ RouterModule.forChild(myAccountRoutes) ],
181 exports: [ RouterModule ]
183 export class MyAccountRoutingModule {}