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