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