]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+admin/users/users.routes.ts
Use HTML config when possible
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / users / users.routes.ts
CommitLineData
df98563e 1import { Routes } from '@angular/router'
2989628b 2import { UserRightGuard } from '@app/core'
67ed6552 3import { UserRight } from '@shared/models'
4c200caa 4import { UserCreateComponent, UserUpdateComponent } from './user-edit'
df98563e 5import { UserListComponent } from './user-list'
67ed6552 6import { UsersComponent } from './users.component'
7da18e44 7
ab32b0fc 8export const UsersRoutes: Routes = [
7da18e44 9 {
1f0215a9
C
10 path: 'users',
11 component: UsersComponent,
954605a8
C
12 canActivate: [ UserRightGuard ],
13 data: {
14 userRight: UserRight.MANAGE_USERS
15 },
1f0215a9
C
16 children: [
17 {
18 path: '',
19 redirectTo: 'list',
20 pathMatch: 'full'
21 },
22 {
23 path: 'list',
24 component: UserListComponent,
25 data: {
26 meta: {
f29f487e 27 title: $localize`Users list`
b58c69a1 28 }
1f0215a9
C
29 }
30 },
31 {
4c200caa
C
32 path: 'create',
33 component: UserCreateComponent,
1f0215a9
C
34 data: {
35 meta: {
f29f487e 36 title: $localize`Create a user`
b58c69a1 37 }
7da18e44 38 }
8094a898
C
39 },
40 {
9b9b1805 41 path: 'update/:id',
8094a898
C
42 component: UserUpdateComponent,
43 data: {
44 meta: {
f29f487e 45 title: $localize`Update a user`
8094a898
C
46 }
47 }
1f0215a9
C
48 }
49 ]
50 }
df98563e 51]