diff options
Diffstat (limited to 'client/src/app/+admin')
-rw-r--r-- | client/src/app/+admin/admin-routing.module.ts | 5 | ||||
-rw-r--r-- | client/src/app/+admin/admin.component.ts | 15 | ||||
-rw-r--r-- | client/src/app/+admin/admin.module.ts | 3 | ||||
-rw-r--r-- | client/src/app/+admin/overview/index.ts | 2 | ||||
-rw-r--r-- | client/src/app/+admin/overview/overview.routes.ts | 6 | ||||
-rw-r--r-- | client/src/app/+admin/overview/users/index.ts (renamed from client/src/app/+admin/users/index.ts) | 1 | ||||
-rw-r--r-- | client/src/app/+admin/overview/users/user-edit/index.ts (renamed from client/src/app/+admin/users/user-edit/index.ts) | 0 | ||||
-rw-r--r-- | client/src/app/+admin/overview/users/user-edit/user-create.component.ts (renamed from client/src/app/+admin/users/user-edit/user-create.component.ts) | 0 | ||||
-rw-r--r-- | client/src/app/+admin/overview/users/user-edit/user-edit.component.html (renamed from client/src/app/+admin/users/user-edit/user-edit.component.html) | 0 | ||||
-rw-r--r-- | client/src/app/+admin/overview/users/user-edit/user-edit.component.scss (renamed from client/src/app/+admin/users/user-edit/user-edit.component.scss) | 0 | ||||
-rw-r--r-- | client/src/app/+admin/overview/users/user-edit/user-edit.ts (renamed from client/src/app/+admin/users/user-edit/user-edit.ts) | 2 | ||||
-rw-r--r-- | client/src/app/+admin/overview/users/user-edit/user-password.component.html (renamed from client/src/app/+admin/users/user-edit/user-password.component.html) | 0 | ||||
-rw-r--r-- | client/src/app/+admin/overview/users/user-edit/user-password.component.scss (renamed from client/src/app/+admin/users/user-edit/user-password.component.scss) | 0 | ||||
-rw-r--r-- | client/src/app/+admin/overview/users/user-edit/user-password.component.ts (renamed from client/src/app/+admin/users/user-edit/user-password.component.ts) | 0 | ||||
-rw-r--r-- | client/src/app/+admin/overview/users/user-edit/user-update.component.ts (renamed from client/src/app/+admin/users/user-edit/user-update.component.ts) | 0 | ||||
-rw-r--r-- | client/src/app/+admin/overview/users/user-list/index.ts (renamed from client/src/app/+admin/users/user-list/index.ts) | 0 | ||||
-rw-r--r-- | client/src/app/+admin/overview/users/user-list/user-list.component.html (renamed from client/src/app/+admin/users/user-list/user-list.component.html) | 5 | ||||
-rw-r--r-- | client/src/app/+admin/overview/users/user-list/user-list.component.scss (renamed from client/src/app/+admin/users/user-list/user-list.component.scss) | 0 | ||||
-rw-r--r-- | client/src/app/+admin/overview/users/user-list/user-list.component.ts (renamed from client/src/app/+admin/users/user-list/user-list.component.ts) | 0 | ||||
-rw-r--r-- | client/src/app/+admin/overview/users/users.routes.ts (renamed from client/src/app/+admin/users/users.routes.ts) | 2 | ||||
-rw-r--r-- | client/src/app/+admin/users/users.component.ts | 7 |
21 files changed, 32 insertions, 16 deletions
diff --git a/client/src/app/+admin/admin-routing.module.ts b/client/src/app/+admin/admin-routing.module.ts index d029661d3..bd08b8287 100644 --- a/client/src/app/+admin/admin-routing.module.ts +++ b/client/src/app/+admin/admin-routing.module.ts | |||
@@ -6,7 +6,7 @@ import { PluginsRoutes } from '@app/+admin/plugins/plugins.routes' | |||
6 | import { SystemRoutes } from '@app/+admin/system' | 6 | import { SystemRoutes } from '@app/+admin/system' |
7 | import { AdminComponent } from './admin.component' | 7 | import { AdminComponent } from './admin.component' |
8 | import { FollowsRoutes } from './follows' | 8 | import { FollowsRoutes } from './follows' |
9 | import { UsersRoutes } from './users' | 9 | import { OverviewRoutes } from './overview' |
10 | 10 | ||
11 | const adminRoutes: Routes = [ | 11 | const adminRoutes: Routes = [ |
12 | { | 12 | { |
@@ -18,8 +18,9 @@ const adminRoutes: Routes = [ | |||
18 | redirectTo: 'users', | 18 | redirectTo: 'users', |
19 | pathMatch: 'full' | 19 | pathMatch: 'full' |
20 | }, | 20 | }, |
21 | |||
21 | ...FollowsRoutes, | 22 | ...FollowsRoutes, |
22 | ...UsersRoutes, | 23 | ...OverviewRoutes, |
23 | ...ModerationRoutes, | 24 | ...ModerationRoutes, |
24 | ...SystemRoutes, | 25 | ...SystemRoutes, |
25 | ...ConfigRoutes, | 26 | ...ConfigRoutes, |
diff --git a/client/src/app/+admin/admin.component.ts b/client/src/app/+admin/admin.component.ts index 15739f8d3..27d5e0a10 100644 --- a/client/src/app/+admin/admin.component.ts +++ b/client/src/app/+admin/admin.component.ts | |||
@@ -31,8 +31,21 @@ export class AdminComponent implements OnInit { | |||
31 | } | 31 | } |
32 | 32 | ||
33 | private buildOverviewItems () { | 33 | private buildOverviewItems () { |
34 | const overviewItems: TopMenuDropdownParam = { | ||
35 | label: $localize`Overview`, | ||
36 | children: [] | ||
37 | } | ||
38 | |||
34 | if (this.hasUsersRight()) { | 39 | if (this.hasUsersRight()) { |
35 | this.menuEntries.push({ label: $localize`Users`, routerLink: '/admin/users' }) | 40 | overviewItems.children.push({ |
41 | label: $localize`Users`, | ||
42 | routerLink: '/admin/users', | ||
43 | iconName: 'user' | ||
44 | }) | ||
45 | } | ||
46 | |||
47 | if (overviewItems.children.length !== 0) { | ||
48 | this.menuEntries.push(overviewItems) | ||
36 | } | 49 | } |
37 | } | 50 | } |
38 | 51 | ||
diff --git a/client/src/app/+admin/admin.module.ts b/client/src/app/+admin/admin.module.ts index 1ea7b9784..a2bd88880 100644 --- a/client/src/app/+admin/admin.module.ts +++ b/client/src/app/+admin/admin.module.ts | |||
@@ -33,6 +33,7 @@ import { AbuseListComponent, VideoBlockListComponent } from './moderation' | |||
33 | import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from './moderation/instance-blocklist' | 33 | import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from './moderation/instance-blocklist' |
34 | import { ModerationComponent } from './moderation/moderation.component' | 34 | import { ModerationComponent } from './moderation/moderation.component' |
35 | import { VideoCommentListComponent } from './moderation/video-comment-list' | 35 | import { VideoCommentListComponent } from './moderation/video-comment-list' |
36 | import { UserCreateComponent, UserListComponent, UserPasswordComponent, UserUpdateComponent } from './overview' | ||
36 | import { PluginListInstalledComponent } from './plugins/plugin-list-installed/plugin-list-installed.component' | 37 | import { PluginListInstalledComponent } from './plugins/plugin-list-installed/plugin-list-installed.component' |
37 | import { PluginSearchComponent } from './plugins/plugin-search/plugin-search.component' | 38 | import { PluginSearchComponent } from './plugins/plugin-search/plugin-search.component' |
38 | import { PluginShowInstalledComponent } from './plugins/plugin-show-installed/plugin-show-installed.component' | 39 | import { PluginShowInstalledComponent } from './plugins/plugin-show-installed/plugin-show-installed.component' |
@@ -41,7 +42,6 @@ import { PluginApiService } from './plugins/shared/plugin-api.service' | |||
41 | import { JobService, LogsComponent, LogsService, SystemComponent } from './system' | 42 | import { JobService, LogsComponent, LogsService, SystemComponent } from './system' |
42 | import { DebugComponent, DebugService } from './system/debug' | 43 | import { DebugComponent, DebugService } from './system/debug' |
43 | import { JobsComponent } from './system/jobs/jobs.component' | 44 | import { JobsComponent } from './system/jobs/jobs.component' |
44 | import { UserCreateComponent, UserListComponent, UserPasswordComponent, UsersComponent, UserUpdateComponent } from './users' | ||
45 | 45 | ||
46 | @NgModule({ | 46 | @NgModule({ |
47 | imports: [ | 47 | imports: [ |
@@ -73,7 +73,6 @@ import { UserCreateComponent, UserListComponent, UserPasswordComponent, UsersCom | |||
73 | VideoRedundanciesListComponent, | 73 | VideoRedundanciesListComponent, |
74 | VideoRedundancyInformationComponent, | 74 | VideoRedundancyInformationComponent, |
75 | 75 | ||
76 | UsersComponent, | ||
77 | UserCreateComponent, | 76 | UserCreateComponent, |
78 | UserUpdateComponent, | 77 | UserUpdateComponent, |
79 | UserPasswordComponent, | 78 | UserPasswordComponent, |
diff --git a/client/src/app/+admin/overview/index.ts b/client/src/app/+admin/overview/index.ts new file mode 100644 index 000000000..b71a6a45f --- /dev/null +++ b/client/src/app/+admin/overview/index.ts | |||
@@ -0,0 +1,2 @@ | |||
1 | export * from './users' | ||
2 | export * from './overview.routes' | ||
diff --git a/client/src/app/+admin/overview/overview.routes.ts b/client/src/app/+admin/overview/overview.routes.ts new file mode 100644 index 000000000..cb5986072 --- /dev/null +++ b/client/src/app/+admin/overview/overview.routes.ts | |||
@@ -0,0 +1,6 @@ | |||
1 | import { Routes } from '@angular/router' | ||
2 | import { UsersRoutes } from './users' | ||
3 | |||
4 | export const OverviewRoutes: Routes = [ | ||
5 | ...UsersRoutes | ||
6 | ] | ||
diff --git a/client/src/app/+admin/users/index.ts b/client/src/app/+admin/overview/users/index.ts index 156e54d89..6f15ab578 100644 --- a/client/src/app/+admin/users/index.ts +++ b/client/src/app/+admin/overview/users/index.ts | |||
@@ -1,4 +1,3 @@ | |||
1 | export * from './user-edit' | 1 | export * from './user-edit' |
2 | export * from './user-list' | 2 | export * from './user-list' |
3 | export * from './users.component' | ||
4 | export * from './users.routes' | 3 | export * from './users.routes' |
diff --git a/client/src/app/+admin/users/user-edit/index.ts b/client/src/app/+admin/overview/users/user-edit/index.ts index ec734ef92..ec734ef92 100644 --- a/client/src/app/+admin/users/user-edit/index.ts +++ b/client/src/app/+admin/overview/users/user-edit/index.ts | |||
diff --git a/client/src/app/+admin/users/user-edit/user-create.component.ts b/client/src/app/+admin/overview/users/user-edit/user-create.component.ts index b61b22fd0..b61b22fd0 100644 --- a/client/src/app/+admin/users/user-edit/user-create.component.ts +++ b/client/src/app/+admin/overview/users/user-edit/user-create.component.ts | |||
diff --git a/client/src/app/+admin/users/user-edit/user-edit.component.html b/client/src/app/+admin/overview/users/user-edit/user-edit.component.html index 772ebf272..772ebf272 100644 --- a/client/src/app/+admin/users/user-edit/user-edit.component.html +++ b/client/src/app/+admin/overview/users/user-edit/user-edit.component.html | |||
diff --git a/client/src/app/+admin/users/user-edit/user-edit.component.scss b/client/src/app/+admin/overview/users/user-edit/user-edit.component.scss index d7932154b..d7932154b 100644 --- a/client/src/app/+admin/users/user-edit/user-edit.component.scss +++ b/client/src/app/+admin/overview/users/user-edit/user-edit.component.scss | |||
diff --git a/client/src/app/+admin/users/user-edit/user-edit.ts b/client/src/app/+admin/overview/users/user-edit/user-edit.ts index af5e674a7..069b62a53 100644 --- a/client/src/app/+admin/users/user-edit/user-edit.ts +++ b/client/src/app/+admin/overview/users/user-edit/user-edit.ts | |||
@@ -4,7 +4,7 @@ import { AuthService, ScreenService, ServerService, User } from '@app/core' | |||
4 | import { FormReactive } from '@app/shared/shared-forms' | 4 | import { FormReactive } from '@app/shared/shared-forms' |
5 | import { USER_ROLE_LABELS } from '@shared/core-utils/users' | 5 | import { USER_ROLE_LABELS } from '@shared/core-utils/users' |
6 | import { HTMLServerConfig, UserAdminFlag, UserRole, VideoResolution } from '@shared/models' | 6 | import { HTMLServerConfig, UserAdminFlag, UserRole, VideoResolution } from '@shared/models' |
7 | import { SelectOptionsItem } from '../../../../types/select-options-item.model' | 7 | import { SelectOptionsItem } from '../../../../../types/select-options-item.model' |
8 | 8 | ||
9 | @Directive() | 9 | @Directive() |
10 | // eslint-disable-next-line @angular-eslint/directive-class-suffix | 10 | // eslint-disable-next-line @angular-eslint/directive-class-suffix |
diff --git a/client/src/app/+admin/users/user-edit/user-password.component.html b/client/src/app/+admin/overview/users/user-edit/user-password.component.html index 1238d1839..1238d1839 100644 --- a/client/src/app/+admin/users/user-edit/user-password.component.html +++ b/client/src/app/+admin/overview/users/user-edit/user-password.component.html | |||
diff --git a/client/src/app/+admin/users/user-edit/user-password.component.scss b/client/src/app/+admin/overview/users/user-edit/user-password.component.scss index acb680682..acb680682 100644 --- a/client/src/app/+admin/users/user-edit/user-password.component.scss +++ b/client/src/app/+admin/overview/users/user-edit/user-password.component.scss | |||
diff --git a/client/src/app/+admin/users/user-edit/user-password.component.ts b/client/src/app/+admin/overview/users/user-edit/user-password.component.ts index 42bf20de1..42bf20de1 100644 --- a/client/src/app/+admin/users/user-edit/user-password.component.ts +++ b/client/src/app/+admin/overview/users/user-edit/user-password.component.ts | |||
diff --git a/client/src/app/+admin/users/user-edit/user-update.component.ts b/client/src/app/+admin/overview/users/user-edit/user-update.component.ts index 42599a17e..42599a17e 100644 --- a/client/src/app/+admin/users/user-edit/user-update.component.ts +++ b/client/src/app/+admin/overview/users/user-edit/user-update.component.ts | |||
diff --git a/client/src/app/+admin/users/user-list/index.ts b/client/src/app/+admin/overview/users/user-list/index.ts index 1826a4abe..1826a4abe 100644 --- a/client/src/app/+admin/users/user-list/index.ts +++ b/client/src/app/+admin/overview/users/user-list/index.ts | |||
diff --git a/client/src/app/+admin/users/user-list/user-list.component.html b/client/src/app/+admin/overview/users/user-list/user-list.component.html index c82f3c06f..a96dbd7f8 100644 --- a/client/src/app/+admin/users/user-list/user-list.component.html +++ b/client/src/app/+admin/overview/users/user-list/user-list.component.html | |||
@@ -1,3 +1,8 @@ | |||
1 | <h1> | ||
2 | <my-global-icon iconName="user" aria-hidden="true"></my-global-icon> | ||
3 | <ng-container i18n>Users</ng-container> | ||
4 | </h1> | ||
5 | |||
1 | <p-table | 6 | <p-table |
2 | [value]="users" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" | 7 | [value]="users" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" |
3 | [sortField]="sort.field" [sortOrder]="sort.order" dataKey="id" [resizableColumns]="true" [(selection)]="selectedUsers" | 8 | [sortField]="sort.field" [sortOrder]="sort.order" dataKey="id" [resizableColumns]="true" [(selection)]="selectedUsers" |
diff --git a/client/src/app/+admin/users/user-list/user-list.component.scss b/client/src/app/+admin/overview/users/user-list/user-list.component.scss index e425306b5..e425306b5 100644 --- a/client/src/app/+admin/users/user-list/user-list.component.scss +++ b/client/src/app/+admin/overview/users/user-list/user-list.component.scss | |||
diff --git a/client/src/app/+admin/users/user-list/user-list.component.ts b/client/src/app/+admin/overview/users/user-list/user-list.component.ts index 548e6e80f..548e6e80f 100644 --- a/client/src/app/+admin/users/user-list/user-list.component.ts +++ b/client/src/app/+admin/overview/users/user-list/user-list.component.ts | |||
diff --git a/client/src/app/+admin/users/users.routes.ts b/client/src/app/+admin/overview/users/users.routes.ts index 9175be067..8b63f5bc7 100644 --- a/client/src/app/+admin/users/users.routes.ts +++ b/client/src/app/+admin/overview/users/users.routes.ts | |||
@@ -3,12 +3,10 @@ import { UserRightGuard } from '@app/core' | |||
3 | import { UserRight } from '@shared/models' | 3 | import { UserRight } from '@shared/models' |
4 | import { UserCreateComponent, UserUpdateComponent } from './user-edit' | 4 | import { UserCreateComponent, UserUpdateComponent } from './user-edit' |
5 | import { UserListComponent } from './user-list' | 5 | import { UserListComponent } from './user-list' |
6 | import { UsersComponent } from './users.component' | ||
7 | 6 | ||
8 | export const UsersRoutes: Routes = [ | 7 | export const UsersRoutes: Routes = [ |
9 | { | 8 | { |
10 | path: 'users', | 9 | path: 'users', |
11 | component: UsersComponent, | ||
12 | canActivate: [ UserRightGuard ], | 10 | canActivate: [ UserRightGuard ], |
13 | data: { | 11 | data: { |
14 | userRight: UserRight.MANAGE_USERS | 12 | userRight: UserRight.MANAGE_USERS |
diff --git a/client/src/app/+admin/users/users.component.ts b/client/src/app/+admin/users/users.component.ts deleted file mode 100644 index e9c8f6b0d..000000000 --- a/client/src/app/+admin/users/users.component.ts +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | import { Component } from '@angular/core' | ||
2 | |||
3 | @Component({ | ||
4 | template: '<router-outlet></router-outlet>' | ||
5 | }) | ||
6 | export class UsersComponent { | ||
7 | } | ||