diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2021-01-26 01:53:13 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-01-28 15:55:34 +0100 |
commit | 3da68f0a781ebd893521e2e6fa200280c92ae815 (patch) | |
tree | 11bddf841118703c725a96851318603407fd581d /client/src/app/+videos/videos-routing.module.ts | |
parent | 28eeb811c40325a28208231324f66f4032e5cf67 (diff) | |
download | PeerTube-3da68f0a781ebd893521e2e6fa200280c92ae815.tar.gz PeerTube-3da68f0a781ebd893521e2e6fa200280c92ae815.tar.zst PeerTube-3da68f0a781ebd893521e2e6fa200280c92ae815.zip |
add default trending page choice, revert comments count for hot strategy
Diffstat (limited to 'client/src/app/+videos/videos-routing.module.ts')
-rw-r--r-- | client/src/app/+videos/videos-routing.module.ts | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/client/src/app/+videos/videos-routing.module.ts b/client/src/app/+videos/videos-routing.module.ts index b6850b436..973935af8 100644 --- a/client/src/app/+videos/videos-routing.module.ts +++ b/client/src/app/+videos/videos-routing.module.ts | |||
@@ -1,11 +1,11 @@ | |||
1 | import { NgModule } from '@angular/core' | 1 | import { NgModule } from '@angular/core' |
2 | import { RouterModule, Routes } from '@angular/router' | 2 | import { RouterModule, Routes } from '@angular/router' |
3 | import { LoginGuard } from '@app/core' | 3 | import { LoginGuard, TrendingGuard } from '@app/core' |
4 | import { MetaGuard } from '@ngx-meta/core' | 4 | import { MetaGuard } from '@ngx-meta/core' |
5 | import { VideoOverviewComponent } from './video-list/overview/video-overview.component' | 5 | import { VideoOverviewComponent } from './video-list/overview/video-overview.component' |
6 | import { VideoHotComponent } from './video-list/trending/video-hot.component' | 6 | import { VideoHotComponent } from './video-list/trending/video-hot.component' |
7 | import { VideoMostLikedComponent } from './video-list/trending/video-most-liked.component' | 7 | import { VideoMostLikedComponent } from './video-list/trending/video-most-liked.component' |
8 | import { VideoTrendingComponent } from './video-list/trending/video-trending.component' | 8 | import { VideoMostViewedComponent } from './video-list/trending/video-most-viewed.component' |
9 | import { VideoLocalComponent } from './video-list/video-local.component' | 9 | import { VideoLocalComponent } from './video-list/video-local.component' |
10 | import { VideoRecentlyAddedComponent } from './video-list/video-recently-added.component' | 10 | import { VideoRecentlyAddedComponent } from './video-list/video-recently-added.component' |
11 | import { VideoUserSubscriptionsComponent } from './video-list/video-user-subscriptions.component' | 11 | import { VideoUserSubscriptionsComponent } from './video-list/video-user-subscriptions.component' |
@@ -28,27 +28,31 @@ const videosRoutes: Routes = [ | |||
28 | }, | 28 | }, |
29 | { | 29 | { |
30 | path: 'trending', | 30 | path: 'trending', |
31 | component: VideoTrendingComponent, | 31 | canActivate: [ TrendingGuard ] |
32 | }, | ||
33 | { | ||
34 | path: 'hot', | ||
35 | component: VideoHotComponent, | ||
32 | data: { | 36 | data: { |
33 | meta: { | 37 | meta: { |
34 | title: $localize`Trending videos` | 38 | title: $localize`Hot videos` |
35 | }, | 39 | }, |
36 | reuse: { | 40 | reuse: { |
37 | enabled: true, | 41 | enabled: true, |
38 | key: 'trending-videos-list' | 42 | key: 'hot-videos-list' |
39 | } | 43 | } |
40 | } | 44 | } |
41 | }, | 45 | }, |
42 | { | 46 | { |
43 | path: 'hot', | 47 | path: 'most-viewed', |
44 | component: VideoHotComponent, | 48 | component: VideoMostViewedComponent, |
45 | data: { | 49 | data: { |
46 | meta: { | 50 | meta: { |
47 | title: $localize`Hot videos` | 51 | title: $localize`Most viewed videos` |
48 | }, | 52 | }, |
49 | reuse: { | 53 | reuse: { |
50 | enabled: true, | 54 | enabled: true, |
51 | key: 'hot-videos-list' | 55 | key: 'most-viewed-videos-list' |
52 | } | 56 | } |
53 | } | 57 | } |
54 | }, | 58 | }, |