]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+my-library/my-library-routing.module.ts
Refactor sort middlewares
[github/Chocobozzz/PeerTube.git] / client / src / app / +my-library / my-library-routing.module.ts
CommitLineData
17119e4a
C
1import { NgModule } from '@angular/core'
2import { RouterModule, Routes } from '@angular/router'
17119e4a
C
3import { LoginGuard } from '../core'
4import { MyHistoryComponent } from './my-history/my-history.component'
5import { MyLibraryComponent } from './my-library.component'
6import { MyOwnershipComponent } from './my-ownership/my-ownership.component'
7import { MySubscriptionsComponent } from './my-subscriptions/my-subscriptions.component'
8import { MyVideoImportsComponent } from './my-video-imports/my-video-imports.component'
9import { MyVideoPlaylistCreateComponent } from './my-video-playlists/my-video-playlist-create.component'
10import { MyVideoPlaylistElementsComponent } from './my-video-playlists/my-video-playlist-elements.component'
11import { MyVideoPlaylistUpdateComponent } from './my-video-playlists/my-video-playlist-update.component'
12import { MyVideoPlaylistsComponent } from './my-video-playlists/my-video-playlists.component'
13import { MyVideosComponent } from './my-videos/my-videos.component'
14
15const myLibraryRoutes: Routes = [
16 {
17 path: '',
18 component: MyLibraryComponent,
0f01a8ba 19 canActivateChild: [ LoginGuard ],
17119e4a
C
20 children: [
21 {
22 path: '',
23 redirectTo: 'video-channels',
24 pathMatch: 'full'
25 },
26
27 {
28 path: 'video-channels',
29 loadChildren: () => {
30 return import('./+my-video-channels/my-video-channels.module').then(m => m.MyVideoChannelsModule)
31 }
32 },
33
34 {
35 path: 'video-playlists',
36 component: MyVideoPlaylistsComponent,
37 data: {
38 meta: {
39 title: $localize`My playlists`
40 }
41 }
42 },
43 {
44 path: 'video-playlists/create',
45 component: MyVideoPlaylistCreateComponent,
46 data: {
47 meta: {
48 title: $localize`Create a new playlist`
49 }
50 }
51 },
52 {
53 path: 'video-playlists/:videoPlaylistId',
54 component: MyVideoPlaylistElementsComponent,
55 data: {
56 meta: {
57 title: $localize`Playlist elements`
58 }
59 }
60 },
61 {
62 path: 'video-playlists/update/:videoPlaylistId',
63 component: MyVideoPlaylistUpdateComponent,
64 data: {
65 meta: {
66 title: $localize`Update playlist`
67 }
68 }
69 },
70
71 {
72 path: 'videos',
73 component: MyVideosComponent,
74 data: {
75 meta: {
76 title: $localize`My videos`
77 },
78 reuse: {
79 enabled: true,
80 key: 'my-videos-list'
81 }
82 }
83 },
84 {
85 path: 'video-imports',
86 component: MyVideoImportsComponent,
87 data: {
88 meta: {
89 title: $localize`My video imports`
90 }
91 }
92 },
93 {
94 path: 'subscriptions',
95 component: MySubscriptionsComponent,
96 data: {
97 meta: {
98 title: $localize`My subscriptions`
99 }
100 }
101 },
102 {
103 path: 'ownership',
104 component: MyOwnershipComponent,
105 data: {
106 meta: {
107 title: $localize`Ownership changes`
108 }
109 }
110 },
111
112 {
113 path: 'history/videos',
114 component: MyHistoryComponent,
115 data: {
116 meta: {
117 title: $localize`My video history`
118 },
119 reuse: {
120 enabled: true,
121 key: 'my-videos-history-list'
122 }
123 }
124 }
125 ]
126 }
127]
128
129@NgModule({
130 imports: [ RouterModule.forChild(myLibraryRoutes) ],
131 exports: [ RouterModule ]
132})
133export class MyLibraryRoutingModule {}