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