]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+admin/moderation/moderation.routes.ts
Merge branch 'release/5.0.0' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / moderation / moderation.routes.ts
index a024f2bee58f6c40987b3a95ded097da0660cfe0..378d2bed738f32cd129c8acdc241b5788208a6c0 100644 (file)
@@ -1,70 +1,98 @@
 import { Routes } from '@angular/router'
-import { UserRight } from '../../../../../shared'
-import { UserRightGuard } from '@app/core'
-import { VideoAbuseListComponent } from '@app/+admin/moderation/video-abuse-list'
-import { VideoBlacklistListComponent } from '@app/+admin/moderation/video-blacklist-list'
-import { VideoAutoBlacklistListComponent } from '@app/+admin/moderation/video-auto-blacklist-list'
-import { ModerationComponent } from '@app/+admin/moderation/moderation.component'
+import { AbuseListComponent } from '@app/+admin/moderation/abuse-list'
 import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist'
+import { VideoBlockListComponent } from '@app/+admin/moderation/video-block-list'
+import { UserRightGuard } from '@app/core'
+import { UserRight } from '@shared/models'
+import { RegistrationListComponent } from './registration-list'
 
 export const ModerationRoutes: Routes = [
   {
     path: 'moderation',
-    component: ModerationComponent,
     children: [
       {
         path: '',
-        redirectTo: 'video-abuses/list',
+        redirectTo: 'abuses/list',
         pathMatch: 'full'
       },
       {
         path: 'video-abuses',
-        redirectTo: 'video-abuses/list',
+        redirectTo: 'abuses/list',
         pathMatch: 'full'
       },
       {
-        path: 'video-blacklist',
-        redirectTo: 'video-blacklist/list',
-        pathMatch: 'full'
-      },
-      {
-        path: 'video-auto-blacklist',
-        redirectTo: 'video-auto-blacklist/list',
+        path: 'video-abuses/list',
+        redirectTo: 'abuses/list',
         pathMatch: 'full'
       },
       {
-        path: 'video-abuses/list',
-        component: VideoAbuseListComponent,
+        path: 'abuses/list',
+        component: AbuseListComponent,
         canActivate: [ UserRightGuard ],
         data: {
-          userRight: UserRight.MANAGE_VIDEO_ABUSES,
+          userRight: UserRight.MANAGE_ABUSES,
           meta: {
-            title: 'Video abuses list'
+            title: $localize`Reports`
           }
         }
       },
+
+      {
+        path: 'video-blacklist',
+        redirectTo: 'video-blocks/list',
+        pathMatch: 'full'
+      },
+      {
+        path: 'video-auto-blacklist',
+        redirectTo: 'video-blocks/list',
+        pathMatch: 'full'
+      },
       {
         path: 'video-auto-blacklist/list',
-        component: VideoAutoBlacklistListComponent,
+        redirectTo: 'video-blocks/list',
+        pathMatch: 'full'
+      },
+      {
+        path: 'video-blacklist',
+        redirectTo: 'video-blocks/list',
+        pathMatch: 'full'
+      },
+      {
+        path: 'video-blocks/list',
+        component: VideoBlockListComponent,
         canActivate: [ UserRightGuard ],
         data: {
           userRight: UserRight.MANAGE_VIDEO_BLACKLIST,
           meta: {
-            title: 'Auto-blacklisted videos'
+            title: $localize`Blocked videos`
           }
         }
       },
+
       {
-        path: 'video-blacklist/list',
-        component: VideoBlacklistListComponent,
+        path: 'registrations/list',
+        component: RegistrationListComponent,
         canActivate: [ UserRightGuard ],
         data: {
-          userRight: UserRight.MANAGE_VIDEO_BLACKLIST,
+          userRight: UserRight.MANAGE_REGISTRATIONS,
           meta: {
-            title: 'Blacklisted videos'
+            title: $localize`User registrations`
           }
         }
       },
+
+      // We moved this component in admin overview pages
+      {
+        path: 'video-comments',
+        redirectTo: 'video-comments/list',
+        pathMatch: 'full'
+      },
+      {
+        path: 'video-comments/list',
+        redirectTo: '/admin/comments/list',
+        pathMatch: 'full'
+      },
+
       {
         path: 'blocklist/accounts',
         component: InstanceAccountBlocklistComponent,
@@ -72,7 +100,7 @@ export const ModerationRoutes: Routes = [
         data: {
           userRight: UserRight.MANAGE_ACCOUNTS_BLOCKLIST,
           meta: {
-            title: 'Muted accounts'
+            title: $localize`Muted accounts`
           }
         }
       },
@@ -83,7 +111,7 @@ export const ModerationRoutes: Routes = [
         data: {
           userRight: UserRight.MANAGE_SERVERS_BLOCKLIST,
           meta: {
-            title: 'Muted instances'
+            title: $localize`Muted instances`
           }
         }
       }