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 { MyHistoryComponent } from './my-history/my-history.component'
6 import { MyLibraryComponent } from './my-library.component'
7 import { MyOwnershipComponent } from './my-ownership/my-ownership.component'
8 import { MySubscriptionsComponent } from './my-subscriptions/my-subscriptions.component'
9 import { MyVideoImportsComponent } from './my-video-imports/my-video-imports.component'
10 import { MyVideoPlaylistCreateComponent } from './my-video-playlists/my-video-playlist-create.component'
11 import { MyVideoPlaylistElementsComponent } from './my-video-playlists/my-video-playlist-elements.component'
12 import { MyVideoPlaylistUpdateComponent } from './my-video-playlists/my-video-playlist-update.component'
13 import { MyVideoPlaylistsComponent } from './my-video-playlists/my-video-playlists.component'
14 import { MyVideosComponent } from './my-videos/my-videos.component'
16 const myLibraryRoutes: Routes = [
19 component: MyLibraryComponent,
20 canActivateChild: [ MetaGuard, LoginGuard ],
24 redirectTo: 'video-channels',
29 path: 'video-channels',
31 return import('./+my-video-channels/my-video-channels.module').then(m => m.MyVideoChannelsModule)
36 path: 'video-playlists',
37 component: MyVideoPlaylistsComponent,
40 title: $localize`My playlists`
45 path: 'video-playlists/create',
46 component: MyVideoPlaylistCreateComponent,
49 title: $localize`Create a new playlist`
54 path: 'video-playlists/:videoPlaylistId',
55 component: MyVideoPlaylistElementsComponent,
58 title: $localize`Playlist elements`
63 path: 'video-playlists/update/:videoPlaylistId',
64 component: MyVideoPlaylistUpdateComponent,
67 title: $localize`Update playlist`
74 component: MyVideosComponent,
77 title: $localize`My videos`
86 path: 'video-imports',
87 component: MyVideoImportsComponent,
90 title: $localize`My video imports`
95 path: 'subscriptions',
96 component: MySubscriptionsComponent,
99 title: $localize`My subscriptions`
105 component: MyOwnershipComponent,
108 title: $localize`Ownership changes`
114 path: 'history/videos',
115 component: MyHistoryComponent,
118 title: $localize`My video history`
122 key: 'my-videos-history-list'
131 imports: [ RouterModule.forChild(myLibraryRoutes) ],
132 exports: [ RouterModule ]
134 export class MyLibraryRoutingModule {}