]>
Commit | Line | Data |
---|---|---|
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 | ||
19 | const myAccountRoutes: Routes = [ | |
20 | { | |
21 | path: '', | |
22 | component: MyAccountComponent, | |
23 | canActivateChild: [ MetaGuard, LoginGuard ], | |
24 | children: [ | |
25 | { | |
26 | path: '', | |
27 | redirectTo: 'settings', | |
28 | pathMatch: 'full' | |
29 | }, | |
30 | { | |
31 | path: 'settings', | |
32 | component: MyAccountSettingsComponent, | |
33 | data: { | |
34 | meta: { | |
35 | title: 'Account settings' | |
36 | } | |
37 | } | |
38 | }, | |
39 | { | |
40 | path: 'video-channels', | |
41 | component: MyAccountVideoChannelsComponent, | |
42 | data: { | |
43 | meta: { | |
44 | title: 'Account video channels' | |
45 | } | |
46 | } | |
47 | }, | |
48 | { | |
49 | path: 'video-channels/create', | |
50 | component: MyAccountVideoChannelCreateComponent, | |
51 | data: { | |
52 | meta: { | |
53 | title: 'Create new video channel' | |
54 | } | |
55 | } | |
56 | }, | |
57 | { | |
58 | path: 'video-channels/update/:videoChannelId', | |
59 | component: MyAccountVideoChannelUpdateComponent, | |
60 | data: { | |
61 | meta: { | |
62 | title: 'Update video channel' | |
63 | } | |
64 | } | |
65 | }, | |
66 | { | |
67 | path: 'videos', | |
68 | component: MyAccountVideosComponent, | |
69 | data: { | |
70 | meta: { | |
71 | title: 'Account videos' | |
72 | } | |
73 | } | |
74 | }, | |
75 | { | |
76 | path: 'video-imports', | |
77 | component: MyAccountVideoImportsComponent, | |
78 | data: { | |
79 | meta: { | |
80 | title: 'Account video imports' | |
81 | } | |
82 | } | |
83 | }, | |
84 | { | |
85 | path: 'subscriptions', | |
86 | component: MyAccountSubscriptionsComponent, | |
87 | data: { | |
88 | meta: { | |
89 | title: 'Account subscriptions' | |
90 | } | |
91 | } | |
92 | }, | |
93 | { | |
94 | path: 'ownership', | |
95 | component: MyAccountOwnershipComponent, | |
96 | data: { | |
97 | meta: { | |
98 | title: 'Ownership changes' | |
99 | } | |
100 | } | |
101 | }, | |
102 | { | |
103 | path: 'blocklist/accounts', | |
104 | component: MyAccountBlocklistComponent, | |
105 | data: { | |
106 | meta: { | |
107 | title: 'Muted accounts' | |
108 | } | |
109 | } | |
110 | }, | |
111 | { | |
112 | path: 'blocklist/servers', | |
113 | component: MyAccountServerBlocklistComponent, | |
114 | data: { | |
115 | meta: { | |
116 | title: 'Muted instances' | |
117 | } | |
118 | } | |
119 | }, | |
120 | { | |
121 | path: 'history/videos', | |
122 | component: MyAccountHistoryComponent, | |
123 | data: { | |
124 | meta: { | |
125 | title: 'Videos history' | |
126 | } | |
127 | } | |
128 | }, | |
129 | { | |
130 | path: 'notifications', | |
131 | component: MyAccountNotificationsComponent, | |
132 | data: { | |
133 | meta: { | |
134 | title: 'Notifications' | |
135 | } | |
136 | } | |
137 | } | |
138 | ] | |
139 | } | |
140 | ] | |
141 | ||
142 | @NgModule({ | |
143 | imports: [ RouterModule.forChild(myAccountRoutes) ], | |
144 | exports: [ RouterModule ] | |
145 | }) | |
146 | export class MyAccountRoutingModule {} |