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 MyAccountVideoPlaylistElementsComponent
27 } from '@app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component'
29 const myAccountRoutes: Routes = [
32 component: MyAccountComponent,
33 canActivateChild: [ MetaGuard, LoginGuard ],
37 redirectTo: 'settings',
42 component: MyAccountSettingsComponent,
45 title: 'Account settings'
51 path: 'video-channels',
52 component: MyAccountVideoChannelsComponent,
55 title: 'Account video channels'
60 path: 'video-channels/create',
61 component: MyAccountVideoChannelCreateComponent,
64 title: 'Create new video channel'
69 path: 'video-channels/update/:videoChannelId',
70 component: MyAccountVideoChannelUpdateComponent,
73 title: 'Update video channel'
79 path: 'video-playlists',
80 component: MyAccountVideoPlaylistsComponent,
83 title: 'Account playlists'
88 path: 'video-playlists/:videoPlaylistId',
89 component: MyAccountVideoPlaylistElementsComponent,
92 title: 'Playlist elements'
97 path: 'video-playlists/create',
98 component: MyAccountVideoPlaylistCreateComponent,
101 title: 'Create new playlist'
106 path: 'video-playlists/update/:videoPlaylistId',
107 component: MyAccountVideoPlaylistUpdateComponent,
110 title: 'Update playlist'
117 component: MyAccountVideosComponent,
120 title: 'Account videos'
125 path: 'video-imports',
126 component: MyAccountVideoImportsComponent,
129 title: 'Account video imports'
134 path: 'subscriptions',
135 component: MyAccountSubscriptionsComponent,
138 title: 'Account subscriptions'
144 component: MyAccountOwnershipComponent,
147 title: 'Ownership changes'
152 path: 'blocklist/accounts',
153 component: MyAccountBlocklistComponent,
156 title: 'Muted accounts'
161 path: 'blocklist/servers',
162 component: MyAccountServerBlocklistComponent,
165 title: 'Muted instances'
170 path: 'history/videos',
171 component: MyAccountHistoryComponent,
174 title: 'Videos history'
179 path: 'notifications',
180 component: MyAccountNotificationsComponent,
183 title: 'Notifications'
192 imports: [ RouterModule.forChild(myAccountRoutes) ],
193 exports: [ RouterModule ]
195 export class MyAccountRoutingModule {}