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 { MyAccountComponent } from './my-account.component'
12 const myAccountRoutes: Routes = [
15 component: MyAccountComponent,
16 canActivateChild: [ LoginGuard ],
20 redirectTo: 'settings',
25 component: MyAccountSettingsComponent,
28 title: $localize`Account settings`
34 path: 'video-channels',
35 redirectTo: '/my-library/video-channels',
40 path: 'video-playlists',
41 redirectTo: '/my-library/video-playlists',
45 path: 'video-playlists/create',
46 redirectTo: '/my-library/video-playlists/create',
50 path: 'video-playlists/:videoPlaylistId',
51 redirectTo: '/my-library/video-playlists/:videoPlaylistId',
55 path: 'video-playlists/update/:videoPlaylistId',
56 redirectTo: '/my-library/video-playlists/update/:videoPlaylistId',
62 redirectTo: '/my-library/videos',
66 path: 'video-imports',
67 redirectTo: '/my-library/video-imports',
71 path: 'subscriptions',
72 redirectTo: '/my-library/subscriptions',
77 redirectTo: '/my-library/ownership',
81 path: 'blocklist/accounts',
82 component: MyAccountBlocklistComponent,
85 title: $localize`Muted accounts`
90 path: 'blocklist/servers',
91 component: MyAccountServerBlocklistComponent,
94 title: $localize`Muted servers`
99 path: 'history/videos',
100 redirectTo: '/my-library/history/videos',
104 path: 'notifications',
105 component: MyAccountNotificationsComponent,
108 title: $localize`Notifications`
114 component: MyAccountAbusesListComponent,
117 title: $localize`My abuse reports`
122 path: 'applications',
123 component: MyAccountApplicationsComponent,
126 title: $localize`Applications`
135 imports: [ RouterModule.forChild(myAccountRoutes) ],
136 exports: [ RouterModule ]
138 export class MyAccountRoutingModule {}