]> 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 6d81b9b363149da288cae5f8837e3f07570a6751..378d2bed738f32cd129c8acdc241b5788208a6c0 100644 (file)
 import { Routes } from '@angular/router'
-import { UserRight } from '../../../../../shared'
+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 { VideoAbuseListComponent } from '@app/+admin/moderation/video-abuse-list'
-import { VideoBlacklistListComponent } from '@app/+admin/moderation/video-blacklist-list'
-import { ModerationComponent } from '@app/+admin/moderation/moderation.component'
+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',
+        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',
+        redirectTo: 'video-blocks/list',
+        pathMatch: 'full'
+      },
+      {
+        path: 'video-blacklist',
+        redirectTo: 'video-blocks/list',
+        pathMatch: 'full'
+      },
       {
-        path: 'video-blacklist/list',
-        component: VideoBlacklistListComponent,
+        path: 'video-blocks/list',
+        component: VideoBlockListComponent,
         canActivate: [ UserRightGuard ],
         data: {
           userRight: UserRight.MANAGE_VIDEO_BLACKLIST,
           meta: {
-            title: 'Blacklisted videos'
+            title: $localize`Blocked videos`
+          }
+        }
+      },
+
+      {
+        path: 'registrations/list',
+        component: RegistrationListComponent,
+        canActivate: [ UserRightGuard ],
+        data: {
+          userRight: UserRight.MANAGE_REGISTRATIONS,
+          meta: {
+            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,
+        canActivate: [ UserRightGuard ],
+        data: {
+          userRight: UserRight.MANAGE_ACCOUNTS_BLOCKLIST,
+          meta: {
+            title: $localize`Muted accounts`
+          }
+        }
+      },
+      {
+        path: 'blocklist/servers',
+        component: InstanceServerBlocklistComponent,
+        canActivate: [ UserRightGuard ],
+        data: {
+          userRight: UserRight.MANAGE_SERVERS_BLOCKLIST,
+          meta: {
+            title: $localize`Muted instances`
           }
         }
       }