X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2F%2Badmin%2Fmoderation%2Fmoderation.routes.ts;h=378d2bed738f32cd129c8acdc241b5788208a6c0;hb=8ca52bcc2c37d457e8b19a237c66b8dd1c00b6b9;hp=b133152d9089d22a26291b68f519a727aafa7915;hpb=614d1ae928ec307b708c4a3eb423797353b1df2a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/+admin/moderation/moderation.routes.ts b/client/src/app/+admin/moderation/moderation.routes.ts index b133152d9..378d2bed7 100644 --- a/client/src/app/+admin/moderation/moderation.routes.ts +++ b/client/src/app/+admin/moderation/moderation.routes.ts @@ -1,39 +1,117 @@ 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: 'abuses/list', pathMatch: 'full' }, { path: 'video-abuses/list', - component: VideoAbuseListComponent, + redirectTo: 'abuses/list', + pathMatch: 'full' + }, + { + 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-blacklist/list', - component: VideoBlacklistListComponent, + path: 'video-auto-blacklist/list', + 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: '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` } } }