]>
Commit | Line | Data |
---|---|---|
1 | import { Routes } from '@angular/router' | |
2 | ||
3 | import { UserRightGuard } from '../../core' | |
4 | import { FriendsComponent } from './friends.component' | |
5 | import { FriendAddComponent } from './friend-add' | |
6 | import { FriendListComponent } from './friend-list' | |
7 | import { UserRight } from '../../../../../shared' | |
8 | ||
9 | export const FriendsRoutes: Routes = [ | |
10 | { | |
11 | path: 'friends', | |
12 | component: FriendsComponent, | |
13 | canActivate: [ UserRightGuard ], | |
14 | data: { | |
15 | userRight: UserRight.MANAGE_PEERTUBE_FOLLOW | |
16 | }, | |
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' | |
29 | } | |
30 | } | |
31 | }, | |
32 | { | |
33 | path: 'add', | |
34 | component: FriendAddComponent, | |
35 | data: { | |
36 | meta: { | |
37 | title: 'Add friends' | |
38 | } | |
39 | } | |
40 | } | |
41 | ] | |
42 | } | |
43 | ] |