]>
Commit | Line | Data |
---|---|---|
0626e7af C |
1 | import { NgModule } from '@angular/core' |
2 | import { RouterModule, Routes } from '@angular/router' | |
3 | import { MetaGuard } from '@ngx-meta/core' | |
37024082 | 4 | import { AccountSearchComponent } from './account-search/account-search.component' |
67264e06 C |
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' | |
0626e7af | 8 | |
170726f5 | 9 | const 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 | 63 | export class AccountsRoutingModule {} |