1 import { NgModule } from '@angular/core'
2 import { RouterModule, Routes } from '@angular/router'
3 import { LoginGuard } from '../core'
4 import { MyAccountAbusesListComponent } from './my-account-abuses/my-account-abuses-list.component'
5 import { MyAccountApplicationsComponent } from './my-account-applications/my-account-applications.component'
6 import { MyAccountBlocklistComponent } from './my-account-blocklist/my-account-blocklist.component'
7 import { MyAccountServerBlocklistComponent } from './my-account-blocklist/my-account-server-blocklist.component'
8 import { MyAccountNotificationsComponent } from './my-account-notifications/my-account-notifications.component'
9 import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component'
10 import { MyAccountTwoFactorComponent } from './my-account-settings/my-account-two-factor'
11 import { MyAccountComponent } from './my-account.component'
13 const myAccountRoutes: Routes = [
16 component: MyAccountComponent,
17 canActivateChild: [ LoginGuard ],
21 redirectTo: 'settings',
26 component: MyAccountSettingsComponent,
29 title: $localize`Account settings`
35 path: 'two-factor-auth',
36 component: MyAccountTwoFactorComponent,
39 title: $localize`Two factor authentication`
45 path: 'video-channels',
46 redirectTo: '/my-library/video-channels',
51 path: 'video-playlists',
52 redirectTo: '/my-library/video-playlists',
56 path: 'video-playlists/create',
57 redirectTo: '/my-library/video-playlists/create',
61 path: 'video-playlists/:videoPlaylistId',
62 redirectTo: '/my-library/video-playlists/:videoPlaylistId',
66 path: 'video-playlists/update/:videoPlaylistId',
67 redirectTo: '/my-library/video-playlists/update/:videoPlaylistId',
73 redirectTo: '/my-library/videos',
77 path: 'video-imports',
78 redirectTo: '/my-library/video-imports',
82 path: 'subscriptions',
83 redirectTo: '/my-library/subscriptions',
88 redirectTo: '/my-library/ownership',
92 path: 'blocklist/accounts',
93 component: MyAccountBlocklistComponent,
96 title: $localize`Muted accounts`
101 path: 'blocklist/servers',
102 component: MyAccountServerBlocklistComponent,
105 title: $localize`Muted servers`
110 path: 'history/videos',
111 redirectTo: '/my-library/history/videos',
115 path: 'notifications',
116 component: MyAccountNotificationsComponent,
119 title: $localize`Notifications`
125 component: MyAccountAbusesListComponent,
128 title: $localize`My abuse reports`
133 path: 'applications',
134 component: MyAccountApplicationsComponent,
137 title: $localize`Applications`
146 imports: [ RouterModule.forChild(myAccountRoutes) ],
147 exports: [ RouterModule ]
149 export class MyAccountRoutingModule {}