1 import { NgModule } from '@angular/core'
2 import { RouterModule, Routes } from '@angular/router'
3 import { LoginGuard } from '../core'
4 import { MyHistoryComponent } from './my-history/my-history.component'
5 import { MyLibraryComponent } from './my-library.component'
6 import { MyOwnershipComponent } from './my-ownership/my-ownership.component'
7 import { MySubscriptionsComponent } from './my-subscriptions/my-subscriptions.component'
8 import { MyVideoImportsComponent } from './my-video-imports/my-video-imports.component'
9 import { MyVideoPlaylistCreateComponent } from './my-video-playlists/my-video-playlist-create.component'
10 import { MyVideoPlaylistElementsComponent } from './my-video-playlists/my-video-playlist-elements.component'
11 import { MyVideoPlaylistUpdateComponent } from './my-video-playlists/my-video-playlist-update.component'
12 import { MyVideoPlaylistsComponent } from './my-video-playlists/my-video-playlists.component'
13 import { MyVideosComponent } from './my-videos/my-videos.component'
15 const myLibraryRoutes: Routes = [
18 component: MyLibraryComponent,
19 canActivateChild: [ LoginGuard ],
23 redirectTo: 'video-channels',
28 path: 'video-channels',
30 return import('./+my-video-channels/my-video-channels.module').then(m => m.MyVideoChannelsModule)
35 path: 'video-playlists',
36 component: MyVideoPlaylistsComponent,
39 title: $localize`My playlists`
44 path: 'video-playlists/create',
45 component: MyVideoPlaylistCreateComponent,
48 title: $localize`Create a new playlist`
53 path: 'video-playlists/:videoPlaylistId',
54 component: MyVideoPlaylistElementsComponent,
57 title: $localize`Playlist elements`
62 path: 'video-playlists/update/:videoPlaylistId',
63 component: MyVideoPlaylistUpdateComponent,
66 title: $localize`Update playlist`
73 component: MyVideosComponent,
76 title: $localize`My videos`
85 path: 'video-imports',
86 component: MyVideoImportsComponent,
89 title: $localize`My video imports`
94 path: 'subscriptions',
95 component: MySubscriptionsComponent,
98 title: $localize`My subscriptions`
104 component: MyOwnershipComponent,
107 title: $localize`Ownership changes`
113 path: 'history/videos',
114 component: MyHistoryComponent,
117 title: $localize`My video history`
121 key: 'my-videos-history-list'
130 imports: [ RouterModule.forChild(myLibraryRoutes) ],
131 exports: [ RouterModule ]
133 export class MyLibraryRoutingModule {}