]>
Commit | Line | Data |
---|---|---|
df98563e | 1 | import { Routes } from '@angular/router' |
e2f555ca | 2 | |
954605a8 | 3 | import { UserRightGuard } from '../../core' |
df98563e C |
4 | import { FriendsComponent } from './friends.component' |
5 | import { FriendAddComponent } from './friend-add' | |
6 | import { FriendListComponent } from './friend-list' | |
954605a8 | 7 | import { UserRight } from '../../../../../shared' |
e2f555ca | 8 | |
ab32b0fc | 9 | export const FriendsRoutes: Routes = [ |
e2f555ca | 10 | { |
df98563e C |
11 | path: 'friends', |
12 | component: FriendsComponent, | |
954605a8 C |
13 | canActivate: [ UserRightGuard ], |
14 | data: { | |
1e1265b3 | 15 | userRight: UserRight.MANAGE_PEERTUBE_FOLLOW |
954605a8 | 16 | }, |
df98563e C |
17 | children: [ |
18 | { | |
19 | path: '', | |
20 | redirectTo: 'list', | |
21 | pathMatch: 'full' | |
22 | }, | |
23 | { | |
24 | path: 'list', | |
25 | component: FriendListComponent, | |
26 | data: { | |
27 | meta: { | |
28 | title: 'Friends list' | |
b58c69a1 | 29 | } |
df98563e C |
30 | } |
31 | }, | |
32 | { | |
33 | path: 'add', | |
34 | component: FriendAddComponent, | |
35 | data: { | |
36 | meta: { | |
37 | title: 'Add friends' | |
b58c69a1 | 38 | } |
e2f555ca | 39 | } |
df98563e C |
40 | } |
41 | ] | |
42 | } | |
43 | ] |