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