follows.routes.ts 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import { Routes } from '@angular/router'
  2. import { VideoRedundanciesListComponent } from '@app/+admin/follows/video-redundancies-list'
  3. import { UserRightGuard } from '@app/core'
  4. import { UserRight } from '@peertube/peertube-models'
  5. import { FollowersListComponent } from './followers-list'
  6. import { FollowingListComponent } from './following-list/following-list.component'
  7. export const FollowsRoutes: Routes = [
  8. {
  9. path: 'follows',
  10. canActivate: [ UserRightGuard ],
  11. data: {
  12. userRight: UserRight.MANAGE_SERVER_FOLLOW
  13. },
  14. children: [
  15. {
  16. path: '',
  17. redirectTo: 'following-list',
  18. pathMatch: 'full'
  19. },
  20. {
  21. path: 'following-list',
  22. component: FollowingListComponent,
  23. data: {
  24. meta: {
  25. title: $localize`Following`
  26. }
  27. }
  28. },
  29. {
  30. path: 'followers-list',
  31. component: FollowersListComponent,
  32. data: {
  33. meta: {
  34. title: $localize`Followers`
  35. }
  36. }
  37. },
  38. {
  39. path: 'following-add',
  40. redirectTo: 'following-list'
  41. },
  42. {
  43. path: 'video-redundancies-list',
  44. component: VideoRedundanciesListComponent,
  45. data: {
  46. meta: {
  47. title: $localize`Redundancy`
  48. }
  49. }
  50. }
  51. ]
  52. }
  53. ]