mirror of https://github.com/Chocobozzz/PeerTube
54 lines
1.4 KiB
TypeScript
54 lines
1.4 KiB
TypeScript
|
import { Routes } from '@angular/router'
|
||
|
|
||
|
import { UserRightGuard } from '../../core'
|
||
|
import { UserRight } from '../../../../../shared'
|
||
|
import { PluginListInstalledComponent } from '@app/+admin/plugins/plugin-list-installed/plugin-list-installed.component'
|
||
|
import { PluginSearchComponent } from '@app/+admin/plugins/plugin-search/plugin-search.component'
|
||
|
import { PluginShowInstalledComponent } from '@app/+admin/plugins/plugin-show-installed/plugin-show-installed.component'
|
||
|
import { PluginsComponent } from '@app/+admin/plugins/plugins.component'
|
||
|
|
||
|
export const PluginsRoutes: Routes = [
|
||
|
{
|
||
|
path: 'plugins',
|
||
|
component: PluginsComponent,
|
||
|
canActivate: [ UserRightGuard ],
|
||
|
data: {
|
||
|
userRight: UserRight.MANAGE_PLUGINS
|
||
|
},
|
||
|
children: [
|
||
|
{
|
||
|
path: '',
|
||
|
redirectTo: 'list-installed',
|
||
|
pathMatch: 'full'
|
||
|
},
|
||
|
{
|
||
|
path: 'list-installed',
|
||
|
component: PluginListInstalledComponent,
|
||
|
data: {
|
||
|
meta: {
|
||
|
title: 'List installed plugins'
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
path: 'search',
|
||
|
component: PluginSearchComponent,
|
||
|
data: {
|
||
|
meta: {
|
||
|
title: 'Search plugins'
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
path: 'show/:name',
|
||
|
component: PluginShowInstalledComponent,
|
||
|
data: {
|
||
|
meta: {
|
||
|
title: 'Show plugin'
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
]
|