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 { MyAccountAbusesListComponent } from './my-account-abuses/my-account-abuses-list.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'
11 import { MyAccountApplicationsComponent } from './my-account-applications/my-account-applications.component'
13 const myAccountRoutes: Routes = [
16 component: MyAccountComponent,
17 canActivateChild: [ MetaGuard, LoginGuard ],
21 redirectTo: 'settings',
26 component: MyAccountSettingsComponent,
29 title: $localize`Account settings`
35 path: 'video-channels',
36 redirectTo: '/my-library/video-channels',
41 path: 'video-playlists',
42 redirectTo: '/my-library/video-playlists',
46 path: 'video-playlists/create',
47 redirectTo: '/my-library/video-playlists/create',
51 path: 'video-playlists/:videoPlaylistId',
52 redirectTo: '/my-library/video-playlists/:videoPlaylistId',
56 path: 'video-playlists/update/:videoPlaylistId',
57 redirectTo: '/my-library/video-playlists/update/:videoPlaylistId',
63 redirectTo: '/my-library/videos',
67 path: 'video-imports',
68 redirectTo: '/my-library/video-imports',
72 path: 'subscriptions',
73 redirectTo: '/my-library/subscriptions',
78 redirectTo: '/my-library/ownership',
82 path: 'blocklist/accounts',
83 component: MyAccountBlocklistComponent,
86 title: $localize`Muted accounts`
91 path: 'blocklist/servers',
92 component: MyAccountServerBlocklistComponent,
95 title: $localize`Muted servers`
100 path: 'history/videos',
101 redirectTo: '/my-library/history/videos',
105 path: 'notifications',
106 component: MyAccountNotificationsComponent,
109 title: $localize`Notifications`
115 component: MyAccountAbusesListComponent,
118 title: $localize`My abuse reports`
123 path: 'applications',
124 component: MyAccountApplicationsComponent,
127 title: $localize`Applications`
136 imports: [ RouterModule.forChild(myAccountRoutes) ],
137 exports: [ RouterModule ]
139 export class MyAccountRoutingModule {}