X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2F%2Badmin%2Fmoderation%2Fmoderation.routes.ts;h=8a31a54dc7cac216dc28d3df485bcab60f5e3508;hb=8ca56654a176ee8f350d31282c6cac4a59f58499;hp=6d81b9b363149da288cae5f8837e3f07570a6751;hpb=ad76628b17ff8f25d3402d6d669b274116bbf76c;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 6d81b9b36..8a31a54dc 100644 --- a/client/src/app/+admin/moderation/moderation.routes.ts +++ b/client/src/app/+admin/moderation/moderation.routes.ts @@ -1,9 +1,10 @@ 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 { 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 { UserRightGuard } from '@app/core' +import { UserRight } from '@shared/models' export const ModerationRoutes: Routes = [ { @@ -12,38 +13,80 @@ export const ModerationRoutes: Routes = [ 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: 'Reports' } } }, { - path: 'video-blacklist/list', - component: VideoBlacklistListComponent, + 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-blocks/list', + component: VideoBlockListComponent, canActivate: [ UserRightGuard ], data: { userRight: UserRight.MANAGE_VIDEO_BLACKLIST, meta: { - title: 'Blacklisted videos' + title: 'Videos blocked' + } + } + }, + { + path: 'blocklist/accounts', + component: InstanceAccountBlocklistComponent, + canActivate: [ UserRightGuard ], + data: { + userRight: UserRight.MANAGE_ACCOUNTS_BLOCKLIST, + meta: { + title: 'Muted accounts' + } + } + }, + { + path: 'blocklist/servers', + component: InstanceServerBlocklistComponent, + canActivate: [ UserRightGuard ], + data: { + userRight: UserRight.MANAGE_SERVERS_BLOCKLIST, + meta: { + title: 'Muted instances' } } }