video.routes.ts 651 B

123456789101112131415161718192021222324252627282930
  1. import { Routes } from '@angular/router'
  2. import { UserRightGuard } from '@app/core'
  3. import { UserRight } from '@peertube/peertube-models'
  4. import { VideoListComponent } from './video-list.component'
  5. export const videosRoutes: Routes = [
  6. {
  7. path: 'videos',
  8. canActivate: [ UserRightGuard ],
  9. data: {
  10. userRight: UserRight.SEE_ALL_VIDEOS
  11. },
  12. children: [
  13. {
  14. path: '',
  15. redirectTo: 'list',
  16. pathMatch: 'full'
  17. },
  18. {
  19. path: 'list',
  20. component: VideoListComponent,
  21. data: {
  22. meta: {
  23. title: $localize`Videos list`
  24. }
  25. }
  26. }
  27. ]
  28. }
  29. ]