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