]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+admin/moderation/moderation.routes.ts
Implement video comment list in admin
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / moderation / moderation.routes.ts
index 8a31a54dc7cac216dc28d3df485bcab60f5e3508..2e28f0911736b7d9fe7d58b49405a960594a5912 100644 (file)
@@ -1,8 +1,9 @@
 import { Routes } from '@angular/router'
+import { AbuseListComponent } from '@app/+admin/moderation/abuse-list'
 import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist'
 import { ModerationComponent } from '@app/+admin/moderation/moderation.component'
-import { AbuseListComponent } from '@app/+admin/moderation/abuse-list'
 import { VideoBlockListComponent } from '@app/+admin/moderation/video-block-list'
+import { VideoCommentListComponent } from './video-comment-list'
 import { UserRightGuard } from '@app/core'
 import { UserRight } from '@shared/models'
 
@@ -33,10 +34,11 @@ export const ModerationRoutes: Routes = [
         data: {
           userRight: UserRight.MANAGE_ABUSES,
           meta: {
-            title: 'Reports'
+            title: $localize`Reports`
           }
         }
       },
+
       {
         path: 'video-blacklist',
         redirectTo: 'video-blocks/list',
@@ -64,10 +66,28 @@ export const ModerationRoutes: Routes = [
         data: {
           userRight: UserRight.MANAGE_VIDEO_BLACKLIST,
           meta: {
-            title: 'Videos blocked'
+            title: $localize`Blocked videos`
           }
         }
       },
+
+      {
+        path: 'video-comments',
+        redirectTo: 'video-comments/list',
+        pathMatch: 'full'
+      },
+      {
+        path: 'video-comments/list',
+        component: VideoCommentListComponent,
+        canActivate: [ UserRightGuard ],
+        data: {
+          userRight: UserRight.SEE_ALL_COMMENTS,
+          meta: {
+            title: $localize`Video comments`
+          }
+        }
+      },
+
       {
         path: 'blocklist/accounts',
         component: InstanceAccountBlocklistComponent,
@@ -75,7 +95,7 @@ export const ModerationRoutes: Routes = [
         data: {
           userRight: UserRight.MANAGE_ACCOUNTS_BLOCKLIST,
           meta: {
-            title: 'Muted accounts'
+            title: $localize`Muted accounts`
           }
         }
       },
@@ -86,7 +106,7 @@ export const ModerationRoutes: Routes = [
         data: {
           userRight: UserRight.MANAGE_SERVERS_BLOCKLIST,
           meta: {
-            title: 'Muted instances'
+            title: $localize`Muted instances`
           }
         }
       }