]>
Commit | Line | Data |
---|---|---|
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 { UserRightGuard } from '@app/core' | |
6 | import { UserRight } from '@shared/models' | |
7 | ||
8 | export const PluginsRoutes: Routes = [ | |
9 | { | |
10 | path: 'plugins', | |
11 | canActivate: [ UserRightGuard ], | |
12 | data: { | |
13 | userRight: UserRight.MANAGE_PLUGINS | |
14 | }, | |
15 | children: [ | |
16 | { | |
17 | path: '', | |
18 | redirectTo: 'list-installed', | |
19 | pathMatch: 'full' | |
20 | }, | |
21 | { | |
22 | path: 'list-installed', | |
23 | component: PluginListInstalledComponent, | |
24 | data: { | |
25 | meta: { | |
26 | title: $localize`List installed plugins` | |
27 | } | |
28 | } | |
29 | }, | |
30 | { | |
31 | path: 'search', | |
32 | component: PluginSearchComponent, | |
33 | data: { | |
34 | meta: { | |
35 | title: $localize`Search plugins` | |
36 | } | |
37 | } | |
38 | }, | |
39 | { | |
40 | path: 'show/:npmName', | |
41 | component: PluginShowInstalledComponent, | |
42 | data: { | |
43 | meta: { | |
44 | title: $localize`Show plugin` | |
45 | } | |
46 | } | |
47 | } | |
48 | ] | |
49 | } | |
50 | ] |