]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+accounts/accounts-routing.module.ts
Redesign account's channels page
[github/Chocobozzz/PeerTube.git] / client / src / app / +accounts / accounts-routing.module.ts
CommitLineData
0626e7af
C
1import { NgModule } from '@angular/core'
2import { RouterModule, Routes } from '@angular/router'
3import { MetaGuard } from '@ngx-meta/core'
37024082 4import { AccountSearchComponent } from './account-search/account-search.component'
67264e06
C
5import { AccountVideoChannelsComponent } from './account-video-channels/account-video-channels.component'
6import { AccountVideosComponent } from './account-videos/account-videos.component'
7import { AccountsComponent } from './accounts.component'
0626e7af 8
170726f5 9const accountsRoutes: Routes = [
1a03bea0
C
10 {
11 path: 'peertube',
12 redirectTo: '/videos/local'
13 },
0626e7af
C
14 {
15 path: ':accountId',
170726f5 16 component: AccountsComponent,
0626e7af
C
17 canActivateChild: [ MetaGuard ],
18 children: [
19 {
20 path: '',
c8487f3f 21 redirectTo: 'video-channels',
0626e7af
C
22 pathMatch: 'full'
23 },
37024082
RK
24 {
25 path: 'video-channels',
26 component: AccountVideoChannelsComponent,
27 data: {
28 meta: {
29 title: $localize`Account video channels`
30 }
31 }
32 },
0626e7af
C
33 {
34 path: 'videos',
35 component: AccountVideosComponent,
36 data: {
37 meta: {
f29f487e 38 title: $localize`Account videos`
489290b8
C
39 },
40 reuse: {
41 enabled: true,
42 key: 'account-videos-list'
0626e7af
C
43 }
44 }
45 },
d3e91a5f 46 {
37024082
RK
47 path: 'search',
48 component: AccountSearchComponent,
d3e91a5f
C
49 data: {
50 meta: {
37024082 51 title: $localize`Search videos within account`
0626e7af
C
52 }
53 }
54 }
55 ]
56 }
57]
58
59@NgModule({
170726f5 60 imports: [ RouterModule.forChild(accountsRoutes) ],
0626e7af
C
61 exports: [ RouterModule ]
62})
170726f5 63export class AccountsRoutingModule {}