]>
Commit | Line | Data |
---|---|---|
df98563e C |
1 | import { NgModule } from '@angular/core' |
2 | import { RouterModule, Routes } from '@angular/router' | |
f47bf2e1 | 3 | import { LoginGuard } from '../core' |
17119e4a | 4 | import { MyAccountAbusesListComponent } from './my-account-abuses/my-account-abuses-list.component' |
0f01a8ba | 5 | import { MyAccountApplicationsComponent } from './my-account-applications/my-account-applications.component' |
67ed6552 C |
6 | import { MyAccountBlocklistComponent } from './my-account-blocklist/my-account-blocklist.component' |
7 | import { MyAccountServerBlocklistComponent } from './my-account-blocklist/my-account-server-blocklist.component' | |
67ed6552 | 8 | import { MyAccountNotificationsComponent } from './my-account-notifications/my-account-notifications.component' |
4bb6886d | 9 | import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component' |
d12b40fb | 10 | import { MyAccountTwoFactorComponent } from './my-account-settings/my-account-two-factor' |
67ed6552 | 11 | import { MyAccountComponent } from './my-account.component' |
693b1aba | 12 | |
4bb6886d | 13 | const myAccountRoutes: Routes = [ |
693b1aba | 14 | { |
62e62f11 | 15 | path: '', |
4bb6886d | 16 | component: MyAccountComponent, |
0f01a8ba | 17 | canActivateChild: [ LoginGuard ], |
c30745f3 | 18 | children: [ |
379acb21 C |
19 | { |
20 | path: '', | |
21 | redirectTo: 'settings', | |
22 | pathMatch: 'full' | |
23 | }, | |
c30745f3 C |
24 | { |
25 | path: 'settings', | |
4bb6886d | 26 | component: MyAccountSettingsComponent, |
c30745f3 C |
27 | data: { |
28 | meta: { | |
f29f487e | 29 | title: $localize`Account settings` |
c30745f3 C |
30 | } |
31 | } | |
32 | }, | |
830b4faf | 33 | |
d12b40fb C |
34 | { |
35 | path: 'two-factor-auth', | |
36 | component: MyAccountTwoFactorComponent, | |
37 | data: { | |
38 | meta: { | |
39 | title: $localize`Two factor authentication` | |
40 | } | |
41 | } | |
42 | }, | |
43 | ||
08c1efbe C |
44 | { |
45 | path: 'video-channels', | |
17119e4a C |
46 | redirectTo: '/my-library/video-channels', |
47 | pathMatch: 'full' | |
08c1efbe | 48 | }, |
830b4faf C |
49 | |
50 | { | |
51 | path: 'video-playlists', | |
17119e4a C |
52 | redirectTo: '/my-library/video-playlists', |
53 | pathMatch: 'full' | |
830b4faf | 54 | }, |
f0a39880 | 55 | { |
bce47964 | 56 | path: 'video-playlists/create', |
17119e4a C |
57 | redirectTo: '/my-library/video-playlists/create', |
58 | pathMatch: 'full' | |
f0a39880 | 59 | }, |
830b4faf | 60 | { |
bce47964 | 61 | path: 'video-playlists/:videoPlaylistId', |
17119e4a C |
62 | redirectTo: '/my-library/video-playlists/:videoPlaylistId', |
63 | pathMatch: 'full' | |
830b4faf C |
64 | }, |
65 | { | |
66 | path: 'video-playlists/update/:videoPlaylistId', | |
17119e4a C |
67 | redirectTo: '/my-library/video-playlists/update/:videoPlaylistId', |
68 | pathMatch: 'full' | |
830b4faf C |
69 | }, |
70 | ||
202f6b6c C |
71 | { |
72 | path: 'videos', | |
17119e4a C |
73 | redirectTo: '/my-library/videos', |
74 | pathMatch: 'full' | |
ed31c059 C |
75 | }, |
76 | { | |
77 | path: 'video-imports', | |
17119e4a C |
78 | redirectTo: '/my-library/video-imports', |
79 | pathMatch: 'full' | |
22a16e36 C |
80 | }, |
81 | { | |
82 | path: 'subscriptions', | |
17119e4a C |
83 | redirectTo: '/my-library/subscriptions', |
84 | pathMatch: 'full' | |
74d63469 GR |
85 | }, |
86 | { | |
87 | path: 'ownership', | |
17119e4a C |
88 | redirectTo: '/my-library/ownership', |
89 | pathMatch: 'full' | |
af5767ff C |
90 | }, |
91 | { | |
92 | path: 'blocklist/accounts', | |
93 | component: MyAccountBlocklistComponent, | |
94 | data: { | |
95 | meta: { | |
f29f487e | 96 | title: $localize`Muted accounts` |
af5767ff C |
97 | } |
98 | } | |
99 | }, | |
100 | { | |
101 | path: 'blocklist/servers', | |
102 | component: MyAccountServerBlocklistComponent, | |
103 | data: { | |
104 | meta: { | |
f29f487e | 105 | title: $localize`Muted servers` |
af5767ff C |
106 | } |
107 | } | |
80bfd33c C |
108 | }, |
109 | { | |
110 | path: 'history/videos', | |
17119e4a C |
111 | redirectTo: '/my-library/history/videos', |
112 | pathMatch: 'full' | |
2f1548fd C |
113 | }, |
114 | { | |
115 | path: 'notifications', | |
116 | component: MyAccountNotificationsComponent, | |
117 | data: { | |
118 | meta: { | |
f29f487e | 119 | title: $localize`Notifications` |
2f1548fd C |
120 | } |
121 | } | |
94148c90 C |
122 | }, |
123 | { | |
124 | path: 'abuses', | |
125 | component: MyAccountAbusesListComponent, | |
126 | data: { | |
127 | meta: { | |
f29f487e | 128 | title: $localize`My abuse reports` |
94148c90 C |
129 | } |
130 | } | |
afff310e RK |
131 | }, |
132 | { | |
133 | path: 'applications', | |
134 | component: MyAccountApplicationsComponent, | |
135 | data: { | |
136 | meta: { | |
19b7ebfa | 137 | title: $localize`Applications` |
afff310e RK |
138 | } |
139 | } | |
202f6b6c | 140 | } |
c30745f3 | 141 | ] |
693b1aba | 142 | } |
df98563e | 143 | ] |
693b1aba C |
144 | |
145 | @NgModule({ | |
4bb6886d | 146 | imports: [ RouterModule.forChild(myAccountRoutes) ], |
693b1aba C |
147 | exports: [ RouterModule ] |
148 | }) | |
4bb6886d | 149 | export class MyAccountRoutingModule {} |