]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+my-account/my-account-routing.module.ts
Update angular to fix localize extraction bug
[github/Chocobozzz/PeerTube.git] / client / src / app / +my-account / my-account-routing.module.ts
CommitLineData
df98563e
C
1import { NgModule } from '@angular/core'
2import { RouterModule, Routes } from '@angular/router'
8b13c289 3import { MetaGuard } from '@ngx-meta/core'
f47bf2e1 4import { LoginGuard } from '../core'
67ed6552
C
5import { MyAccountBlocklistComponent } from './my-account-blocklist/my-account-blocklist.component'
6import { MyAccountServerBlocklistComponent } from './my-account-blocklist/my-account-server-blocklist.component'
7import { MyAccountHistoryComponent } from './my-account-history/my-account-history.component'
8import { MyAccountNotificationsComponent } from './my-account-notifications/my-account-notifications.component'
9import { MyAccountOwnershipComponent } from './my-account-ownership/my-account-ownership.component'
4bb6886d 10import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component'
67ed6552
C
11import { MyAccountSubscriptionsComponent } from './my-account-subscriptions/my-account-subscriptions.component'
12import { MyAccountVideoImportsComponent } from './my-account-video-imports/my-account-video-imports.component'
13import { MyAccountVideoPlaylistCreateComponent } from './my-account-video-playlists/my-account-video-playlist-create.component'
14import { MyAccountVideoPlaylistElementsComponent } from './my-account-video-playlists/my-account-video-playlist-elements.component'
15import { MyAccountVideoPlaylistUpdateComponent } from './my-account-video-playlists/my-account-video-playlist-update.component'
16import { MyAccountVideoPlaylistsComponent } from './my-account-video-playlists/my-account-video-playlists.component'
4bb6886d 17import { MyAccountVideosComponent } from './my-account-videos/my-account-videos.component'
67ed6552 18import { MyAccountComponent } from './my-account.component'
94148c90 19import { MyAccountAbusesListComponent } from './my-account-abuses/my-account-abuses-list.component'
693b1aba 20
4bb6886d 21const myAccountRoutes: Routes = [
693b1aba 22 {
62e62f11 23 path: '',
4bb6886d 24 component: MyAccountComponent,
c30745f3
C
25 canActivateChild: [ MetaGuard, LoginGuard ],
26 children: [
379acb21
C
27 {
28 path: '',
29 redirectTo: 'settings',
30 pathMatch: 'full'
31 },
c30745f3
C
32 {
33 path: 'settings',
4bb6886d 34 component: MyAccountSettingsComponent,
c30745f3
C
35 data: {
36 meta: {
f29f487e 37 title: $localize`Account settings`
c30745f3
C
38 }
39 }
40 },
830b4faf 41
08c1efbe
C
42 {
43 path: 'video-channels',
67ed6552
C
44 loadChildren: () => {
45 return import('./+my-account-video-channels/my-account-video-channels.module')
46 .then(m => m.MyAccountVideoChannelsModule)
47 }
08c1efbe 48 },
830b4faf
C
49
50 {
51 path: 'video-playlists',
52 component: MyAccountVideoPlaylistsComponent,
53 data: {
54 meta: {
f29f487e 55 title: $localize`Account playlists`
830b4faf
C
56 }
57 }
58 },
f0a39880 59 {
bce47964
C
60 path: 'video-playlists/create',
61 component: MyAccountVideoPlaylistCreateComponent,
f0a39880
C
62 data: {
63 meta: {
f29f487e 64 title: $localize`Create new playlist`
f0a39880
C
65 }
66 }
67 },
830b4faf 68 {
bce47964
C
69 path: 'video-playlists/:videoPlaylistId',
70 component: MyAccountVideoPlaylistElementsComponent,
830b4faf
C
71 data: {
72 meta: {
f29f487e 73 title: $localize`Playlist elements`
830b4faf
C
74 }
75 }
76 },
77 {
78 path: 'video-playlists/update/:videoPlaylistId',
79 component: MyAccountVideoPlaylistUpdateComponent,
80 data: {
81 meta: {
f29f487e 82 title: $localize`Update playlist`
830b4faf
C
83 }
84 }
85 },
86
202f6b6c
C
87 {
88 path: 'videos',
4bb6886d 89 component: MyAccountVideosComponent,
202f6b6c
C
90 data: {
91 meta: {
f29f487e 92 title: $localize`Account videos`
489290b8
C
93 },
94 reuse: {
95 enabled: true,
96 key: 'my-account-videos-list'
202f6b6c
C
97 }
98 }
ed31c059
C
99 },
100 {
101 path: 'video-imports',
102 component: MyAccountVideoImportsComponent,
103 data: {
104 meta: {
f29f487e 105 title: $localize`Account video imports`
ed31c059
C
106 }
107 }
22a16e36
C
108 },
109 {
110 path: 'subscriptions',
111 component: MyAccountSubscriptionsComponent,
112 data: {
113 meta: {
f29f487e 114 title: $localize`Account subscriptions`
22a16e36
C
115 }
116 }
74d63469
GR
117 },
118 {
119 path: 'ownership',
120 component: MyAccountOwnershipComponent,
121 data: {
122 meta: {
f29f487e 123 title: $localize`Ownership changes`
74d63469
GR
124 }
125 }
af5767ff
C
126 },
127 {
128 path: 'blocklist/accounts',
129 component: MyAccountBlocklistComponent,
130 data: {
131 meta: {
f29f487e 132 title: $localize`Muted accounts`
af5767ff
C
133 }
134 }
135 },
136 {
137 path: 'blocklist/servers',
138 component: MyAccountServerBlocklistComponent,
139 data: {
140 meta: {
f29f487e 141 title: $localize`Muted servers`
af5767ff
C
142 }
143 }
80bfd33c
C
144 },
145 {
146 path: 'history/videos',
147 component: MyAccountHistoryComponent,
148 data: {
149 meta: {
f29f487e 150 title: $localize`Videos history`
489290b8
C
151 },
152 reuse: {
153 enabled: true,
154 key: 'my-videos-history-list'
80bfd33c
C
155 }
156 }
2f1548fd
C
157 },
158 {
159 path: 'notifications',
160 component: MyAccountNotificationsComponent,
161 data: {
162 meta: {
f29f487e 163 title: $localize`Notifications`
2f1548fd
C
164 }
165 }
94148c90
C
166 },
167 {
168 path: 'abuses',
169 component: MyAccountAbusesListComponent,
170 data: {
171 meta: {
f29f487e 172 title: $localize`My abuse reports`
94148c90
C
173 }
174 }
202f6b6c 175 }
c30745f3 176 ]
693b1aba 177 }
df98563e 178]
693b1aba
C
179
180@NgModule({
4bb6886d 181 imports: [ RouterModule.forChild(myAccountRoutes) ],
693b1aba
C
182 exports: [ RouterModule ]
183})
4bb6886d 184export class MyAccountRoutingModule {}