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