aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/src/app/+admin/admin.component.ts16
-rw-r--r--client/src/app/+admin/admin.module.ts2
-rw-r--r--client/src/app/+admin/moderation/moderation.routes.ts12
-rw-r--r--client/src/app/+admin/overview/comments/index.ts (renamed from client/src/app/+admin/moderation/video-comment-list/index.ts)1
-rw-r--r--client/src/app/+admin/overview/comments/video-comment-list.component.html (renamed from client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.html)0
-rw-r--r--client/src/app/+admin/overview/comments/video-comment-list.component.scss (renamed from client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.scss)0
-rw-r--r--client/src/app/+admin/overview/comments/video-comment-list.component.ts (renamed from client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.ts)0
-rw-r--r--client/src/app/+admin/overview/comments/video-comment.routes.ts30
-rw-r--r--client/src/app/+admin/overview/index.ts1
-rw-r--r--client/src/app/+admin/overview/overview.routes.ts10
-rw-r--r--client/src/app/+admin/overview/users/users.routes.ts2
-rw-r--r--client/src/app/+admin/overview/videos/video.routes.ts2
12 files changed, 52 insertions, 24 deletions
diff --git a/client/src/app/+admin/admin.component.ts b/client/src/app/+admin/admin.component.ts
index b8a957d1c..746549555 100644
--- a/client/src/app/+admin/admin.component.ts
+++ b/client/src/app/+admin/admin.component.ts
@@ -52,6 +52,14 @@ export class AdminComponent implements OnInit {
52 }) 52 })
53 } 53 }
54 54
55 if (this.hasVideoCommentsRight()) {
56 overviewItems.children.push({
57 label: $localize`Comments`,
58 routerLink: '/admin/comments',
59 iconName: 'message-circle'
60 })
61 }
62
55 if (overviewItems.children.length !== 0) { 63 if (overviewItems.children.length !== 0) {
56 this.menuEntries.push(overviewItems) 64 this.menuEntries.push(overviewItems)
57 } 65 }
@@ -104,14 +112,6 @@ export class AdminComponent implements OnInit {
104 }) 112 })
105 } 113 }
106 114
107 if (this.hasVideoCommentsRight()) {
108 moderationItems.children.push({
109 label: $localize`Video comments`,
110 routerLink: '/admin/moderation/video-comments/list',
111 iconName: 'message-circle'
112 })
113 }
114
115 if (this.hasAccountsBlocklistRight()) { 115 if (this.hasAccountsBlocklistRight()) {
116 moderationItems.children.push({ 116 moderationItems.children.push({
117 label: $localize`Muted accounts`, 117 label: $localize`Muted accounts`,
diff --git a/client/src/app/+admin/admin.module.ts b/client/src/app/+admin/admin.module.ts
index c672fa280..366e29883 100644
--- a/client/src/app/+admin/admin.module.ts
+++ b/client/src/app/+admin/admin.module.ts
@@ -32,13 +32,13 @@ import { RedundancyCheckboxComponent } from './follows/shared/redundancy-checkbo
32import { VideoRedundancyInformationComponent } from './follows/video-redundancies-list/video-redundancy-information.component' 32import { VideoRedundancyInformationComponent } from './follows/video-redundancies-list/video-redundancy-information.component'
33import { AbuseListComponent, VideoBlockListComponent } from './moderation' 33import { AbuseListComponent, VideoBlockListComponent } from './moderation'
34import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from './moderation/instance-blocklist' 34import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from './moderation/instance-blocklist'
35import { VideoCommentListComponent } from './moderation/video-comment-list'
36import { 35import {
37 UserCreateComponent, 36 UserCreateComponent,
38 UserListComponent, 37 UserListComponent,
39 UserPasswordComponent, 38 UserPasswordComponent,
40 UserUpdateComponent, 39 UserUpdateComponent,
41 VideoAdminService, 40 VideoAdminService,
41 VideoCommentListComponent,
42 VideoListComponent 42 VideoListComponent
43} from './overview' 43} from './overview'
44import { 44import {
diff --git a/client/src/app/+admin/moderation/moderation.routes.ts b/client/src/app/+admin/moderation/moderation.routes.ts
index 5c39ff366..1ad301039 100644
--- a/client/src/app/+admin/moderation/moderation.routes.ts
+++ b/client/src/app/+admin/moderation/moderation.routes.ts
@@ -2,7 +2,6 @@ import { Routes } from '@angular/router'
2import { AbuseListComponent } from '@app/+admin/moderation/abuse-list' 2import { AbuseListComponent } from '@app/+admin/moderation/abuse-list'
3import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist' 3import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist'
4import { VideoBlockListComponent } from '@app/+admin/moderation/video-block-list' 4import { VideoBlockListComponent } from '@app/+admin/moderation/video-block-list'
5import { VideoCommentListComponent } from './video-comment-list'
6import { UserRightGuard } from '@app/core' 5import { UserRightGuard } from '@app/core'
7import { UserRight } from '@shared/models' 6import { UserRight } from '@shared/models'
8 7
@@ -69,6 +68,7 @@ export const ModerationRoutes: Routes = [
69 } 68 }
70 }, 69 },
71 70
71 // We move this component in admin overview pages
72 { 72 {
73 path: 'video-comments', 73 path: 'video-comments',
74 redirectTo: 'video-comments/list', 74 redirectTo: 'video-comments/list',
@@ -76,14 +76,8 @@ export const ModerationRoutes: Routes = [
76 }, 76 },
77 { 77 {
78 path: 'video-comments/list', 78 path: 'video-comments/list',
79 component: VideoCommentListComponent, 79 redirectTo: '/admin/comments/list',
80 canActivate: [ UserRightGuard ], 80 pathMatch: 'full'
81 data: {
82 userRight: UserRight.SEE_ALL_COMMENTS,
83 meta: {
84 title: $localize`Video comments`
85 }
86 }
87 }, 81 },
88 82
89 { 83 {
diff --git a/client/src/app/+admin/moderation/video-comment-list/index.ts b/client/src/app/+admin/overview/comments/index.ts
index eb08b4177..c487f7a81 100644
--- a/client/src/app/+admin/moderation/video-comment-list/index.ts
+++ b/client/src/app/+admin/overview/comments/index.ts
@@ -1 +1,2 @@
1export * from './video-comment-list.component' 1export * from './video-comment-list.component'
2export * from './video-comment.routes'
diff --git a/client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.html b/client/src/app/+admin/overview/comments/video-comment-list.component.html
index 0dbbbe1cc..0dbbbe1cc 100644
--- a/client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.html
+++ b/client/src/app/+admin/overview/comments/video-comment-list.component.html
diff --git a/client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.scss b/client/src/app/+admin/overview/comments/video-comment-list.component.scss
index 3cf7b8db6..3cf7b8db6 100644
--- a/client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.scss
+++ b/client/src/app/+admin/overview/comments/video-comment-list.component.scss
diff --git a/client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.ts b/client/src/app/+admin/overview/comments/video-comment-list.component.ts
index 25fe65133..25fe65133 100644
--- a/client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.ts
+++ b/client/src/app/+admin/overview/comments/video-comment-list.component.ts
diff --git a/client/src/app/+admin/overview/comments/video-comment.routes.ts b/client/src/app/+admin/overview/comments/video-comment.routes.ts
new file mode 100644
index 000000000..f0bd440ad
--- /dev/null
+++ b/client/src/app/+admin/overview/comments/video-comment.routes.ts
@@ -0,0 +1,30 @@
1import { Routes } from '@angular/router'
2import { UserRightGuard } from '@app/core'
3import { UserRight } from '@shared/models'
4import { VideoCommentListComponent } from './video-comment-list.component'
5
6export const commentRoutes: Routes = [
7 {
8 path: 'comments',
9 canActivate: [ UserRightGuard ],
10 data: {
11 userRight: UserRight.SEE_ALL_COMMENTS
12 },
13 children: [
14 {
15 path: '',
16 redirectTo: 'list',
17 pathMatch: 'full'
18 },
19 {
20 path: 'list',
21 component: VideoCommentListComponent,
22 data: {
23 meta: {
24 title: $localize`Comments list`
25 }
26 }
27 }
28 ]
29 }
30]
diff --git a/client/src/app/+admin/overview/index.ts b/client/src/app/+admin/overview/index.ts
index a9c46893f..111360734 100644
--- a/client/src/app/+admin/overview/index.ts
+++ b/client/src/app/+admin/overview/index.ts
@@ -1,3 +1,4 @@
1export * from './comments'
1export * from './users' 2export * from './users'
2export * from './videos' 3export * from './videos'
3export * from './overview.routes' 4export * from './overview.routes'
diff --git a/client/src/app/+admin/overview/overview.routes.ts b/client/src/app/+admin/overview/overview.routes.ts
index 1e6686d16..72d6835d7 100644
--- a/client/src/app/+admin/overview/overview.routes.ts
+++ b/client/src/app/+admin/overview/overview.routes.ts
@@ -1,8 +1,10 @@
1import { Routes } from '@angular/router' 1import { Routes } from '@angular/router'
2import { UsersRoutes } from './users' 2import { commentRoutes } from './comments'
3import { VideosRoutes } from './videos' 3import { usersRoutes } from './users'
4import { videosRoutes } from './videos'
4 5
5export const OverviewRoutes: Routes = [ 6export const OverviewRoutes: Routes = [
6 ...UsersRoutes, 7 ...commentRoutes,
7 ...VideosRoutes 8 ...usersRoutes,
9 ...videosRoutes
8] 10]
diff --git a/client/src/app/+admin/overview/users/users.routes.ts b/client/src/app/+admin/overview/users/users.routes.ts
index 8b63f5bc7..c9724e5fb 100644
--- a/client/src/app/+admin/overview/users/users.routes.ts
+++ b/client/src/app/+admin/overview/users/users.routes.ts
@@ -4,7 +4,7 @@ import { UserRight } from '@shared/models'
4import { UserCreateComponent, UserUpdateComponent } from './user-edit' 4import { UserCreateComponent, UserUpdateComponent } from './user-edit'
5import { UserListComponent } from './user-list' 5import { UserListComponent } from './user-list'
6 6
7export const UsersRoutes: Routes = [ 7export const usersRoutes: Routes = [
8 { 8 {
9 path: 'users', 9 path: 'users',
10 canActivate: [ UserRightGuard ], 10 canActivate: [ UserRightGuard ],
diff --git a/client/src/app/+admin/overview/videos/video.routes.ts b/client/src/app/+admin/overview/videos/video.routes.ts
index 984df7b82..01cb5b497 100644
--- a/client/src/app/+admin/overview/videos/video.routes.ts
+++ b/client/src/app/+admin/overview/videos/video.routes.ts
@@ -3,7 +3,7 @@ import { UserRightGuard } from '@app/core'
3import { UserRight } from '@shared/models' 3import { UserRight } from '@shared/models'
4import { VideoListComponent } from './video-list.component' 4import { VideoListComponent } from './video-list.component'
5 5
6export const VideosRoutes: Routes = [ 6export const videosRoutes: Routes = [
7 { 7 {
8 path: 'videos', 8 path: 'videos',
9 canActivate: [ UserRightGuard ], 9 canActivate: [ UserRightGuard ],