Add video channel view
[oweals/peertube.git] / client / src / app / +my-account / my-account-routing.module.ts
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 { MyAccountComponent } from './my-account.component'
6 import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component'
7 import { MyAccountVideosComponent } from './my-account-videos/my-account-videos.component'
8 import { MyAccountVideoChannelsComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channels.component'
9 import { MyAccountVideoChannelCreateComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channel-create.component'
10 import { MyAccountVideoChannelUpdateComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channel-update.component'
11 import { MyAccountVideoImportsComponent } from '@app/+my-account/my-account-video-imports/my-account-video-imports.component'
12 import { MyAccountSubscriptionsComponent } from '@app/+my-account/my-account-subscriptions/my-account-subscriptions.component'
13 import { MyAccountOwnershipComponent } from '@app/+my-account/my-account-ownership/my-account-ownership.component'
14 import { MyAccountBlocklistComponent } from '@app/+my-account/my-account-blocklist/my-account-blocklist.component'
15 import { MyAccountServerBlocklistComponent } from '@app/+my-account/my-account-blocklist/my-account-server-blocklist.component'
16 import { MyAccountHistoryComponent } from '@app/+my-account/my-account-history/my-account-history.component'
17 import { MyAccountNotificationsComponent } from '@app/+my-account/my-account-notifications/my-account-notifications.component'
18 import { MyAccountVideoPlaylistsComponent } from '@app/+my-account/my-account-video-playlists/my-account-video-playlists.component'
19 import {
20   MyAccountVideoPlaylistCreateComponent
21 } from '@app/+my-account/my-account-video-playlists/my-account-video-playlist-create.component'
22 import {
23   MyAccountVideoPlaylistUpdateComponent
24 } from '@app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component'
25 import {
26   MyAccountVideoPlaylistElementsComponent
27 } from '@app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component'
28
29 const myAccountRoutes: Routes = [
30   {
31     path: '',
32     component: MyAccountComponent,
33     canActivateChild: [ MetaGuard, LoginGuard ],
34     children: [
35       {
36         path: '',
37         redirectTo: 'settings',
38         pathMatch: 'full'
39       },
40       {
41         path: 'settings',
42         component: MyAccountSettingsComponent,
43         data: {
44           meta: {
45             title: 'Account settings'
46           }
47         }
48       },
49
50       {
51         path: 'video-channels',
52         component: MyAccountVideoChannelsComponent,
53         data: {
54           meta: {
55             title: 'Account video channels'
56           }
57         }
58       },
59       {
60         path: 'video-channels/create',
61         component: MyAccountVideoChannelCreateComponent,
62         data: {
63           meta: {
64             title: 'Create new video channel'
65           }
66         }
67       },
68       {
69         path: 'video-channels/update/:videoChannelId',
70         component: MyAccountVideoChannelUpdateComponent,
71         data: {
72           meta: {
73             title: 'Update video channel'
74           }
75         }
76       },
77
78       {
79         path: 'video-playlists',
80         component: MyAccountVideoPlaylistsComponent,
81         data: {
82           meta: {
83             title: 'Account playlists'
84           }
85         }
86       },
87       {
88         path: 'video-playlists/create',
89         component: MyAccountVideoPlaylistCreateComponent,
90         data: {
91           meta: {
92             title: 'Create new playlist'
93           }
94         }
95       },
96       {
97         path: 'video-playlists/:videoPlaylistId',
98         component: MyAccountVideoPlaylistElementsComponent,
99         data: {
100           meta: {
101             title: 'Playlist elements'
102           }
103         }
104       },
105       {
106         path: 'video-playlists/update/:videoPlaylistId',
107         component: MyAccountVideoPlaylistUpdateComponent,
108         data: {
109           meta: {
110             title: 'Update playlist'
111           }
112         }
113       },
114
115       {
116         path: 'videos',
117         component: MyAccountVideosComponent,
118         data: {
119           meta: {
120             title: 'Account videos'
121           }
122         }
123       },
124       {
125         path: 'video-imports',
126         component: MyAccountVideoImportsComponent,
127         data: {
128           meta: {
129             title: 'Account video imports'
130           }
131         }
132       },
133       {
134         path: 'subscriptions',
135         component: MyAccountSubscriptionsComponent,
136         data: {
137           meta: {
138             title: 'Account subscriptions'
139           }
140         }
141       },
142       {
143         path: 'ownership',
144         component: MyAccountOwnershipComponent,
145         data: {
146           meta: {
147             title: 'Ownership changes'
148           }
149         }
150       },
151       {
152         path: 'blocklist/accounts',
153         component: MyAccountBlocklistComponent,
154         data: {
155           meta: {
156             title: 'Muted accounts'
157           }
158         }
159       },
160       {
161         path: 'blocklist/servers',
162         component: MyAccountServerBlocklistComponent,
163         data: {
164           meta: {
165             title: 'Muted instances'
166           }
167         }
168       },
169       {
170         path: 'history/videos',
171         component: MyAccountHistoryComponent,
172         data: {
173           meta: {
174             title: 'Videos history'
175           }
176         }
177       },
178       {
179         path: 'notifications',
180         component: MyAccountNotificationsComponent,
181         data: {
182           meta: {
183             title: 'Notifications'
184           }
185         }
186       }
187     ]
188   }
189 ]
190
191 @NgModule({
192   imports: [ RouterModule.forChild(myAccountRoutes) ],
193   exports: [ RouterModule ]
194 })
195 export class MyAccountRoutingModule {}