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