]>
Commit | Line | Data |
---|---|---|
df98563e C |
1 | import { NgModule } from '@angular/core' |
2 | import { RouterModule, Routes } from '@angular/router' | |
8b13c289 | 3 | import { MetaGuard } from '@ngx-meta/core' |
f47bf2e1 | 4 | import { LoginGuard } from '../core' |
67ed6552 C |
5 | import { MyAccountBlocklistComponent } from './my-account-blocklist/my-account-blocklist.component' |
6 | import { MyAccountServerBlocklistComponent } from './my-account-blocklist/my-account-server-blocklist.component' | |
7 | import { MyAccountHistoryComponent } from './my-account-history/my-account-history.component' | |
8 | import { MyAccountNotificationsComponent } from './my-account-notifications/my-account-notifications.component' | |
9 | import { MyAccountOwnershipComponent } from './my-account-ownership/my-account-ownership.component' | |
4bb6886d | 10 | import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component' |
67ed6552 C |
11 | import { MyAccountSubscriptionsComponent } from './my-account-subscriptions/my-account-subscriptions.component' |
12 | import { MyAccountVideoImportsComponent } from './my-account-video-imports/my-account-video-imports.component' | |
13 | import { MyAccountVideoPlaylistCreateComponent } from './my-account-video-playlists/my-account-video-playlist-create.component' | |
14 | import { MyAccountVideoPlaylistElementsComponent } from './my-account-video-playlists/my-account-video-playlist-elements.component' | |
15 | import { MyAccountVideoPlaylistUpdateComponent } from './my-account-video-playlists/my-account-video-playlist-update.component' | |
16 | import { MyAccountVideoPlaylistsComponent } from './my-account-video-playlists/my-account-video-playlists.component' | |
4bb6886d | 17 | import { MyAccountVideosComponent } from './my-account-videos/my-account-videos.component' |
67ed6552 | 18 | import { MyAccountComponent } from './my-account.component' |
94148c90 | 19 | import { MyAccountAbusesListComponent } from './my-account-abuses/my-account-abuses-list.component' |
693b1aba | 20 | |
4bb6886d | 21 | const myAccountRoutes: Routes = [ |
693b1aba | 22 | { |
62e62f11 | 23 | path: '', |
4bb6886d | 24 | component: MyAccountComponent, |
c30745f3 C |
25 | canActivateChild: [ MetaGuard, LoginGuard ], |
26 | children: [ | |
379acb21 C |
27 | { |
28 | path: '', | |
29 | redirectTo: 'settings', | |
30 | pathMatch: 'full' | |
31 | }, | |
c30745f3 C |
32 | { |
33 | path: 'settings', | |
4bb6886d | 34 | component: MyAccountSettingsComponent, |
c30745f3 C |
35 | data: { |
36 | meta: { | |
37 | title: 'Account settings' | |
38 | } | |
39 | } | |
40 | }, | |
830b4faf | 41 | |
08c1efbe C |
42 | { |
43 | path: 'video-channels', | |
67ed6552 C |
44 | loadChildren: () => { |
45 | return import('./+my-account-video-channels/my-account-video-channels.module') | |
46 | .then(m => m.MyAccountVideoChannelsModule) | |
47 | } | |
08c1efbe | 48 | }, |
830b4faf C |
49 | |
50 | { | |
51 | path: 'video-playlists', | |
52 | component: MyAccountVideoPlaylistsComponent, | |
53 | data: { | |
54 | meta: { | |
55 | title: 'Account playlists' | |
56 | } | |
57 | } | |
58 | }, | |
f0a39880 | 59 | { |
bce47964 C |
60 | path: 'video-playlists/create', |
61 | component: MyAccountVideoPlaylistCreateComponent, | |
f0a39880 C |
62 | data: { |
63 | meta: { | |
bce47964 | 64 | title: 'Create new playlist' |
f0a39880 C |
65 | } |
66 | } | |
67 | }, | |
830b4faf | 68 | { |
bce47964 C |
69 | path: 'video-playlists/:videoPlaylistId', |
70 | component: MyAccountVideoPlaylistElementsComponent, | |
830b4faf C |
71 | data: { |
72 | meta: { | |
bce47964 | 73 | title: 'Playlist elements' |
830b4faf C |
74 | } |
75 | } | |
76 | }, | |
77 | { | |
78 | path: 'video-playlists/update/:videoPlaylistId', | |
79 | component: MyAccountVideoPlaylistUpdateComponent, | |
80 | data: { | |
81 | meta: { | |
82 | title: 'Update playlist' | |
83 | } | |
84 | } | |
85 | }, | |
86 | ||
202f6b6c C |
87 | { |
88 | path: 'videos', | |
4bb6886d | 89 | component: MyAccountVideosComponent, |
202f6b6c C |
90 | data: { |
91 | meta: { | |
92 | title: 'Account videos' | |
489290b8 C |
93 | }, |
94 | reuse: { | |
95 | enabled: true, | |
96 | key: 'my-account-videos-list' | |
202f6b6c C |
97 | } |
98 | } | |
ed31c059 C |
99 | }, |
100 | { | |
101 | path: 'video-imports', | |
102 | component: MyAccountVideoImportsComponent, | |
103 | data: { | |
104 | meta: { | |
105 | title: 'Account video imports' | |
106 | } | |
107 | } | |
22a16e36 C |
108 | }, |
109 | { | |
110 | path: 'subscriptions', | |
111 | component: MyAccountSubscriptionsComponent, | |
112 | data: { | |
113 | meta: { | |
114 | title: 'Account subscriptions' | |
115 | } | |
116 | } | |
74d63469 GR |
117 | }, |
118 | { | |
119 | path: 'ownership', | |
120 | component: MyAccountOwnershipComponent, | |
121 | data: { | |
122 | meta: { | |
123 | title: 'Ownership changes' | |
124 | } | |
125 | } | |
af5767ff C |
126 | }, |
127 | { | |
128 | path: 'blocklist/accounts', | |
129 | component: MyAccountBlocklistComponent, | |
130 | data: { | |
131 | meta: { | |
92ea70a7 | 132 | title: 'Muted accounts' |
af5767ff C |
133 | } |
134 | } | |
135 | }, | |
136 | { | |
137 | path: 'blocklist/servers', | |
138 | component: MyAccountServerBlocklistComponent, | |
139 | data: { | |
140 | meta: { | |
22839330 | 141 | title: 'Muted servers' |
af5767ff C |
142 | } |
143 | } | |
80bfd33c C |
144 | }, |
145 | { | |
146 | path: 'history/videos', | |
147 | component: MyAccountHistoryComponent, | |
148 | data: { | |
149 | meta: { | |
150 | title: 'Videos history' | |
489290b8 C |
151 | }, |
152 | reuse: { | |
153 | enabled: true, | |
154 | key: 'my-videos-history-list' | |
80bfd33c C |
155 | } |
156 | } | |
2f1548fd C |
157 | }, |
158 | { | |
159 | path: 'notifications', | |
160 | component: MyAccountNotificationsComponent, | |
161 | data: { | |
162 | meta: { | |
163 | title: 'Notifications' | |
164 | } | |
165 | } | |
94148c90 C |
166 | }, |
167 | { | |
168 | path: 'abuses', | |
169 | component: MyAccountAbusesListComponent, | |
170 | data: { | |
171 | meta: { | |
172 | title: 'My abuses' | |
173 | } | |
174 | } | |
202f6b6c | 175 | } |
c30745f3 | 176 | ] |
693b1aba | 177 | } |
df98563e | 178 | ] |
693b1aba C |
179 | |
180 | @NgModule({ | |
4bb6886d | 181 | imports: [ RouterModule.forChild(myAccountRoutes) ], |
693b1aba C |
182 | exports: [ RouterModule ] |
183 | }) | |
4bb6886d | 184 | export class MyAccountRoutingModule {} |