aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-03-21 16:49:46 +0100
committerChocobozzz <me@florianbigard.com>2019-04-02 11:45:02 +0200
commit489290b8b16bede6ddfb773adad55dee6471ccfd (patch)
tree8d3bb73c80df18f1e4d15b23a7e4080a6bc5985e /client/src/app/videos
parent7ccddd7b5250bd25a917a6e77e58b87b9484a2a4 (diff)
downloadPeerTube-489290b8b16bede6ddfb773adad55dee6471ccfd.tar.gz
PeerTube-489290b8b16bede6ddfb773adad55dee6471ccfd.tar.zst
PeerTube-489290b8b16bede6ddfb773adad55dee6471ccfd.zip
Restore videos list components
Diffstat (limited to 'client/src/app/videos')
-rw-r--r--client/src/app/videos/video-list/video-local.component.ts8
-rw-r--r--client/src/app/videos/video-list/video-recently-added.component.ts10
-rw-r--r--client/src/app/videos/video-list/video-trending.component.ts7
-rw-r--r--client/src/app/videos/video-list/video-user-subscriptions.component.ts8
-rw-r--r--client/src/app/videos/videos-routing.module.ts16
5 files changed, 28 insertions, 21 deletions
diff --git a/client/src/app/videos/video-list/video-local.component.ts b/client/src/app/videos/video-list/video-local.component.ts
index c0be4b885..13d4023c2 100644
--- a/client/src/app/videos/video-list/video-local.component.ts
+++ b/client/src/app/videos/video-list/video-local.component.ts
@@ -1,7 +1,6 @@
1import { Component, OnDestroy, OnInit } from '@angular/core' 1import { Component, OnDestroy, OnInit } from '@angular/core'
2import { ActivatedRoute, Router } from '@angular/router' 2import { ActivatedRoute, Router } from '@angular/router'
3import { immutableAssign } from '@app/shared/misc/utils' 3import { immutableAssign } from '@app/shared/misc/utils'
4import { Location } from '@angular/common'
5import { AuthService } from '../../core/auth' 4import { AuthService } from '../../core/auth'
6import { AbstractVideoList } from '../../shared/video/abstract-video-list' 5import { AbstractVideoList } from '../../shared/video/abstract-video-list'
7import { VideoSortField } from '../../shared/video/sort-field.type' 6import { VideoSortField } from '../../shared/video/sort-field.type'
@@ -10,7 +9,7 @@ import { VideoFilter } from '../../../../../shared/models/videos/video-query.typ
10import { I18n } from '@ngx-translate/i18n-polyfill' 9import { I18n } from '@ngx-translate/i18n-polyfill'
11import { ScreenService } from '@app/shared/misc/screen.service' 10import { ScreenService } from '@app/shared/misc/screen.service'
12import { UserRight } from '../../../../../shared/models/users' 11import { UserRight } from '../../../../../shared/models/users'
13import { Notifier } from '@app/core' 12import { Notifier, ServerService } from '@app/core'
14 13
15@Component({ 14@Component({
16 selector: 'my-videos-local', 15 selector: 'my-videos-local',
@@ -19,18 +18,17 @@ import { Notifier } from '@app/core'
19}) 18})
20export class VideoLocalComponent extends AbstractVideoList implements OnInit, OnDestroy { 19export class VideoLocalComponent extends AbstractVideoList implements OnInit, OnDestroy {
21 titlePage: string 20 titlePage: string
22 currentRoute = '/videos/local'
23 sort = '-publishedAt' as VideoSortField 21 sort = '-publishedAt' as VideoSortField
24 filter: VideoFilter = 'local' 22 filter: VideoFilter = 'local'
25 23
26 constructor ( 24 constructor (
27 protected router: Router, 25 protected router: Router,
26 protected serverService: ServerService,
28 protected route: ActivatedRoute, 27 protected route: ActivatedRoute,
29 protected notifier: Notifier, 28 protected notifier: Notifier,
30 protected authService: AuthService, 29 protected authService: AuthService,
31 protected location: Location,
32 protected i18n: I18n,
33 protected screenService: ScreenService, 30 protected screenService: ScreenService,
31 private i18n: I18n,
34 private videoService: VideoService 32 private videoService: VideoService
35 ) { 33 ) {
36 super() 34 super()
diff --git a/client/src/app/videos/video-list/video-recently-added.component.ts b/client/src/app/videos/video-list/video-recently-added.component.ts
index f99c8abb6..80cef813e 100644
--- a/client/src/app/videos/video-list/video-recently-added.component.ts
+++ b/client/src/app/videos/video-list/video-recently-added.component.ts
@@ -1,6 +1,5 @@
1import { Component, OnDestroy, OnInit } from '@angular/core' 1import { Component, OnDestroy, OnInit } from '@angular/core'
2import { ActivatedRoute, Router } from '@angular/router' 2import { ActivatedRoute, Router } from '@angular/router'
3import { Location } from '@angular/common'
4import { immutableAssign } from '@app/shared/misc/utils' 3import { immutableAssign } from '@app/shared/misc/utils'
5import { AuthService } from '../../core/auth' 4import { AuthService } from '../../core/auth'
6import { AbstractVideoList } from '../../shared/video/abstract-video-list' 5import { AbstractVideoList } from '../../shared/video/abstract-video-list'
@@ -8,7 +7,7 @@ import { VideoSortField } from '../../shared/video/sort-field.type'
8import { VideoService } from '../../shared/video/video.service' 7import { VideoService } from '../../shared/video/video.service'
9import { I18n } from '@ngx-translate/i18n-polyfill' 8import { I18n } from '@ngx-translate/i18n-polyfill'
10import { ScreenService } from '@app/shared/misc/screen.service' 9import { ScreenService } from '@app/shared/misc/screen.service'
11import { Notifier } from '@app/core' 10import { Notifier, ServerService } from '@app/core'
12 11
13@Component({ 12@Component({
14 selector: 'my-videos-recently-added', 13 selector: 'my-videos-recently-added',
@@ -17,17 +16,16 @@ import { Notifier } from '@app/core'
17}) 16})
18export class VideoRecentlyAddedComponent extends AbstractVideoList implements OnInit, OnDestroy { 17export class VideoRecentlyAddedComponent extends AbstractVideoList implements OnInit, OnDestroy {
19 titlePage: string 18 titlePage: string
20 currentRoute = '/videos/recently-added'
21 sort: VideoSortField = '-publishedAt' 19 sort: VideoSortField = '-publishedAt'
22 20
23 constructor ( 21 constructor (
24 protected router: Router,
25 protected route: ActivatedRoute, 22 protected route: ActivatedRoute,
26 protected location: Location, 23 protected serverService: ServerService,
24 protected router: Router,
27 protected notifier: Notifier, 25 protected notifier: Notifier,
28 protected authService: AuthService, 26 protected authService: AuthService,
29 protected i18n: I18n,
30 protected screenService: ScreenService, 27 protected screenService: ScreenService,
28 private i18n: I18n,
31 private videoService: VideoService 29 private videoService: VideoService
32 ) { 30 ) {
33 super() 31 super()
diff --git a/client/src/app/videos/video-list/video-trending.component.ts b/client/src/app/videos/video-list/video-trending.component.ts
index a66a0f97c..e2ad95bc4 100644
--- a/client/src/app/videos/video-list/video-trending.component.ts
+++ b/client/src/app/videos/video-list/video-trending.component.ts
@@ -1,6 +1,5 @@
1import { Component, OnDestroy, OnInit } from '@angular/core' 1import { Component, OnDestroy, OnInit } from '@angular/core'
2import { ActivatedRoute, Router } from '@angular/router' 2import { ActivatedRoute, Router } from '@angular/router'
3import { Location } from '@angular/common'
4import { immutableAssign } from '@app/shared/misc/utils' 3import { immutableAssign } from '@app/shared/misc/utils'
5import { AuthService } from '../../core/auth' 4import { AuthService } from '../../core/auth'
6import { AbstractVideoList } from '../../shared/video/abstract-video-list' 5import { AbstractVideoList } from '../../shared/video/abstract-video-list'
@@ -17,18 +16,16 @@ import { Notifier, ServerService } from '@app/core'
17}) 16})
18export class VideoTrendingComponent extends AbstractVideoList implements OnInit, OnDestroy { 17export class VideoTrendingComponent extends AbstractVideoList implements OnInit, OnDestroy {
19 titlePage: string 18 titlePage: string
20 currentRoute = '/videos/trending'
21 defaultSort: VideoSortField = '-trending' 19 defaultSort: VideoSortField = '-trending'
22 20
23 constructor ( 21 constructor (
24 protected router: Router, 22 protected router: Router,
23 protected serverService: ServerService,
25 protected route: ActivatedRoute, 24 protected route: ActivatedRoute,
26 protected notifier: Notifier, 25 protected notifier: Notifier,
27 protected authService: AuthService, 26 protected authService: AuthService,
28 protected location: Location,
29 protected screenService: ScreenService, 27 protected screenService: ScreenService,
30 private serverService: ServerService, 28 private i18n: I18n,
31 protected i18n: I18n,
32 private videoService: VideoService 29 private videoService: VideoService
33 ) { 30 ) {
34 super() 31 super()
diff --git a/client/src/app/videos/video-list/video-user-subscriptions.component.ts b/client/src/app/videos/video-list/video-user-subscriptions.component.ts
index bee828e12..2f0685ccc 100644
--- a/client/src/app/videos/video-list/video-user-subscriptions.component.ts
+++ b/client/src/app/videos/video-list/video-user-subscriptions.component.ts
@@ -1,7 +1,6 @@
1import { Component, OnDestroy, OnInit } from '@angular/core' 1import { Component, OnDestroy, OnInit } from '@angular/core'
2import { ActivatedRoute, Router } from '@angular/router' 2import { ActivatedRoute, Router } from '@angular/router'
3import { immutableAssign } from '@app/shared/misc/utils' 3import { immutableAssign } from '@app/shared/misc/utils'
4import { Location } from '@angular/common'
5import { AuthService } from '../../core/auth' 4import { AuthService } from '../../core/auth'
6import { AbstractVideoList } from '../../shared/video/abstract-video-list' 5import { AbstractVideoList } from '../../shared/video/abstract-video-list'
7import { VideoSortField } from '../../shared/video/sort-field.type' 6import { VideoSortField } from '../../shared/video/sort-field.type'
@@ -9,7 +8,7 @@ import { VideoService } from '../../shared/video/video.service'
9import { I18n } from '@ngx-translate/i18n-polyfill' 8import { I18n } from '@ngx-translate/i18n-polyfill'
10import { ScreenService } from '@app/shared/misc/screen.service' 9import { ScreenService } from '@app/shared/misc/screen.service'
11import { OwnerDisplayType } from '@app/shared/video/video-miniature.component' 10import { OwnerDisplayType } from '@app/shared/video/video-miniature.component'
12import { Notifier } from '@app/core' 11import { Notifier, ServerService } from '@app/core'
13 12
14@Component({ 13@Component({
15 selector: 'my-videos-user-subscriptions', 14 selector: 'my-videos-user-subscriptions',
@@ -18,18 +17,17 @@ import { Notifier } from '@app/core'
18}) 17})
19export class VideoUserSubscriptionsComponent extends AbstractVideoList implements OnInit, OnDestroy { 18export class VideoUserSubscriptionsComponent extends AbstractVideoList implements OnInit, OnDestroy {
20 titlePage: string 19 titlePage: string
21 currentRoute = '/videos/subscriptions'
22 sort = '-publishedAt' as VideoSortField 20 sort = '-publishedAt' as VideoSortField
23 ownerDisplayType: OwnerDisplayType = 'auto' 21 ownerDisplayType: OwnerDisplayType = 'auto'
24 22
25 constructor ( 23 constructor (
26 protected router: Router, 24 protected router: Router,
25 protected serverService: ServerService,
27 protected route: ActivatedRoute, 26 protected route: ActivatedRoute,
28 protected notifier: Notifier, 27 protected notifier: Notifier,
29 protected authService: AuthService, 28 protected authService: AuthService,
30 protected location: Location,
31 protected i18n: I18n,
32 protected screenService: ScreenService, 29 protected screenService: ScreenService,
30 private i18n: I18n,
33 private videoService: VideoService 31 private videoService: VideoService
34 ) { 32 ) {
35 super() 33 super()
diff --git a/client/src/app/videos/videos-routing.module.ts b/client/src/app/videos/videos-routing.module.ts
index 69a9232ce..505173a5b 100644
--- a/client/src/app/videos/videos-routing.module.ts
+++ b/client/src/app/videos/videos-routing.module.ts
@@ -29,6 +29,10 @@ const videosRoutes: Routes = [
29 data: { 29 data: {
30 meta: { 30 meta: {
31 title: 'Trending videos' 31 title: 'Trending videos'
32 },
33 reuse: {
34 enabled: true,
35 key: 'trending-videos-list'
32 } 36 }
33 } 37 }
34 }, 38 },
@@ -38,6 +42,10 @@ const videosRoutes: Routes = [
38 data: { 42 data: {
39 meta: { 43 meta: {
40 title: 'Recently added videos' 44 title: 'Recently added videos'
45 },
46 reuse: {
47 enabled: true,
48 key: 'recently-added-videos-list'
41 } 49 }
42 } 50 }
43 }, 51 },
@@ -47,6 +55,10 @@ const videosRoutes: Routes = [
47 data: { 55 data: {
48 meta: { 56 meta: {
49 title: 'Subscriptions' 57 title: 'Subscriptions'
58 },
59 reuse: {
60 enabled: true,
61 key: 'subscription-videos-list'
50 } 62 }
51 } 63 }
52 }, 64 },
@@ -56,6 +68,10 @@ const videosRoutes: Routes = [
56 data: { 68 data: {
57 meta: { 69 meta: {
58 title: 'Local videos' 70 title: 'Local videos'
71 },
72 reuse: {
73 enabled: true,
74 key: 'local-videos-list'
59 } 75 }
60 } 76 }
61 }, 77 },