]>
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' |
4bb6886d C |
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' | |
62e62f11 C |
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' | |
ed31c059 | 11 | import { MyAccountVideoImportsComponent } from '@app/+my-account/my-account-video-imports/my-account-video-imports.component' |
22a16e36 | 12 | import { MyAccountSubscriptionsComponent } from '@app/+my-account/my-account-subscriptions/my-account-subscriptions.component' |
74d63469 | 13 | import { MyAccountOwnershipComponent } from '@app/+my-account/my-account-ownership/my-account-ownership.component' |
af5767ff C |
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' | |
80bfd33c | 16 | import { MyAccountHistoryComponent } from '@app/+my-account/my-account-history/my-account-history.component' |
2f1548fd | 17 | import { MyAccountNotificationsComponent } from '@app/+my-account/my-account-notifications/my-account-notifications.component' |
693b1aba | 18 | |
4bb6886d | 19 | const myAccountRoutes: Routes = [ |
693b1aba | 20 | { |
62e62f11 | 21 | path: '', |
4bb6886d | 22 | component: MyAccountComponent, |
c30745f3 C |
23 | canActivateChild: [ MetaGuard, LoginGuard ], |
24 | children: [ | |
379acb21 C |
25 | { |
26 | path: '', | |
27 | redirectTo: 'settings', | |
28 | pathMatch: 'full' | |
29 | }, | |
c30745f3 C |
30 | { |
31 | path: 'settings', | |
4bb6886d | 32 | component: MyAccountSettingsComponent, |
c30745f3 C |
33 | data: { |
34 | meta: { | |
35 | title: 'Account settings' | |
36 | } | |
37 | } | |
38 | }, | |
08c1efbe C |
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 | }, | |
202f6b6c C |
66 | { |
67 | path: 'videos', | |
4bb6886d | 68 | component: MyAccountVideosComponent, |
202f6b6c C |
69 | data: { |
70 | meta: { | |
71 | title: 'Account videos' | |
72 | } | |
73 | } | |
ed31c059 C |
74 | }, |
75 | { | |
76 | path: 'video-imports', | |
77 | component: MyAccountVideoImportsComponent, | |
78 | data: { | |
79 | meta: { | |
80 | title: 'Account video imports' | |
81 | } | |
82 | } | |
22a16e36 C |
83 | }, |
84 | { | |
85 | path: 'subscriptions', | |
86 | component: MyAccountSubscriptionsComponent, | |
87 | data: { | |
88 | meta: { | |
89 | title: 'Account subscriptions' | |
90 | } | |
91 | } | |
74d63469 GR |
92 | }, |
93 | { | |
94 | path: 'ownership', | |
95 | component: MyAccountOwnershipComponent, | |
96 | data: { | |
97 | meta: { | |
98 | title: 'Ownership changes' | |
99 | } | |
100 | } | |
af5767ff C |
101 | }, |
102 | { | |
103 | path: 'blocklist/accounts', | |
104 | component: MyAccountBlocklistComponent, | |
105 | data: { | |
106 | meta: { | |
92ea70a7 | 107 | title: 'Muted accounts' |
af5767ff C |
108 | } |
109 | } | |
110 | }, | |
111 | { | |
112 | path: 'blocklist/servers', | |
113 | component: MyAccountServerBlocklistComponent, | |
114 | data: { | |
115 | meta: { | |
92ea70a7 | 116 | title: 'Muted instances' |
af5767ff C |
117 | } |
118 | } | |
80bfd33c C |
119 | }, |
120 | { | |
121 | path: 'history/videos', | |
122 | component: MyAccountHistoryComponent, | |
123 | data: { | |
124 | meta: { | |
125 | title: 'Videos history' | |
126 | } | |
127 | } | |
2f1548fd C |
128 | }, |
129 | { | |
130 | path: 'notifications', | |
131 | component: MyAccountNotificationsComponent, | |
132 | data: { | |
133 | meta: { | |
134 | title: 'Notifications' | |
135 | } | |
136 | } | |
202f6b6c | 137 | } |
c30745f3 | 138 | ] |
693b1aba | 139 | } |
df98563e | 140 | ] |
693b1aba C |
141 | |
142 | @NgModule({ | |
4bb6886d | 143 | imports: [ RouterModule.forChild(myAccountRoutes) ], |
693b1aba C |
144 | exports: [ RouterModule ] |
145 | }) | |
4bb6886d | 146 | export class MyAccountRoutingModule {} |