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