]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+admin/plugins/plugins.routes.ts
Merge branch 'release/3.1.0' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / plugins / plugins.routes.ts
1 import { Routes } from '@angular/router'
2 import { PluginListInstalledComponent } from '@app/+admin/plugins/plugin-list-installed/plugin-list-installed.component'
3 import { PluginSearchComponent } from '@app/+admin/plugins/plugin-search/plugin-search.component'
4 import { PluginShowInstalledComponent } from '@app/+admin/plugins/plugin-show-installed/plugin-show-installed.component'
5 import { PluginsComponent } from '@app/+admin/plugins/plugins.component'
6 import { UserRightGuard } from '@app/core'
7 import { UserRight } from '@shared/models'
8
9 export const PluginsRoutes: Routes = [
10 {
11 path: 'plugins',
12 component: PluginsComponent,
13 canActivate: [ UserRightGuard ],
14 data: {
15 userRight: UserRight.MANAGE_PLUGINS
16 },
17 children: [
18 {
19 path: '',
20 redirectTo: 'list-installed',
21 pathMatch: 'full'
22 },
23 {
24 path: 'list-installed',
25 component: PluginListInstalledComponent,
26 data: {
27 meta: {
28 title: $localize`List installed plugins`
29 }
30 }
31 },
32 {
33 path: 'search',
34 component: PluginSearchComponent,
35 data: {
36 meta: {
37 title: $localize`Search plugins`
38 }
39 }
40 },
41 {
42 path: 'show/:npmName',
43 component: PluginShowInstalledComponent,
44 data: {
45 meta: {
46 title: $localize`Show plugin`
47 }
48 }
49 }
50 ]
51 }
52 ]