diff options
author | Chocobozzz <me@florianbigard.com> | 2019-03-21 16:49:46 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-04-02 11:45:02 +0200 |
commit | 489290b8b16bede6ddfb773adad55dee6471ccfd (patch) | |
tree | 8d3bb73c80df18f1e4d15b23a7e4080a6bc5985e /client/src/app/videos/video-list | |
parent | 7ccddd7b5250bd25a917a6e77e58b87b9484a2a4 (diff) | |
download | PeerTube-489290b8b16bede6ddfb773adad55dee6471ccfd.tar.gz PeerTube-489290b8b16bede6ddfb773adad55dee6471ccfd.tar.zst PeerTube-489290b8b16bede6ddfb773adad55dee6471ccfd.zip |
Restore videos list components
Diffstat (limited to 'client/src/app/videos/video-list')
4 files changed, 12 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 @@ | |||
1 | import { Component, OnDestroy, OnInit } from '@angular/core' | 1 | import { Component, OnDestroy, OnInit } from '@angular/core' |
2 | import { ActivatedRoute, Router } from '@angular/router' | 2 | import { ActivatedRoute, Router } from '@angular/router' |
3 | import { immutableAssign } from '@app/shared/misc/utils' | 3 | import { immutableAssign } from '@app/shared/misc/utils' |
4 | import { Location } from '@angular/common' | ||
5 | import { AuthService } from '../../core/auth' | 4 | import { AuthService } from '../../core/auth' |
6 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' | 5 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' |
7 | import { VideoSortField } from '../../shared/video/sort-field.type' | 6 | import { VideoSortField } from '../../shared/video/sort-field.type' |
@@ -10,7 +9,7 @@ import { VideoFilter } from '../../../../../shared/models/videos/video-query.typ | |||
10 | import { I18n } from '@ngx-translate/i18n-polyfill' | 9 | import { I18n } from '@ngx-translate/i18n-polyfill' |
11 | import { ScreenService } from '@app/shared/misc/screen.service' | 10 | import { ScreenService } from '@app/shared/misc/screen.service' |
12 | import { UserRight } from '../../../../../shared/models/users' | 11 | import { UserRight } from '../../../../../shared/models/users' |
13 | import { Notifier } from '@app/core' | 12 | import { 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 | }) |
20 | export class VideoLocalComponent extends AbstractVideoList implements OnInit, OnDestroy { | 19 | export 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 @@ | |||
1 | import { Component, OnDestroy, OnInit } from '@angular/core' | 1 | import { Component, OnDestroy, OnInit } from '@angular/core' |
2 | import { ActivatedRoute, Router } from '@angular/router' | 2 | import { ActivatedRoute, Router } from '@angular/router' |
3 | import { Location } from '@angular/common' | ||
4 | import { immutableAssign } from '@app/shared/misc/utils' | 3 | import { immutableAssign } from '@app/shared/misc/utils' |
5 | import { AuthService } from '../../core/auth' | 4 | import { AuthService } from '../../core/auth' |
6 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' | 5 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' |
@@ -8,7 +7,7 @@ import { VideoSortField } from '../../shared/video/sort-field.type' | |||
8 | import { VideoService } from '../../shared/video/video.service' | 7 | import { VideoService } from '../../shared/video/video.service' |
9 | import { I18n } from '@ngx-translate/i18n-polyfill' | 8 | import { I18n } from '@ngx-translate/i18n-polyfill' |
10 | import { ScreenService } from '@app/shared/misc/screen.service' | 9 | import { ScreenService } from '@app/shared/misc/screen.service' |
11 | import { Notifier } from '@app/core' | 10 | import { 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 | }) |
18 | export class VideoRecentlyAddedComponent extends AbstractVideoList implements OnInit, OnDestroy { | 17 | export 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 @@ | |||
1 | import { Component, OnDestroy, OnInit } from '@angular/core' | 1 | import { Component, OnDestroy, OnInit } from '@angular/core' |
2 | import { ActivatedRoute, Router } from '@angular/router' | 2 | import { ActivatedRoute, Router } from '@angular/router' |
3 | import { Location } from '@angular/common' | ||
4 | import { immutableAssign } from '@app/shared/misc/utils' | 3 | import { immutableAssign } from '@app/shared/misc/utils' |
5 | import { AuthService } from '../../core/auth' | 4 | import { AuthService } from '../../core/auth' |
6 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' | 5 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' |
@@ -17,18 +16,16 @@ import { Notifier, ServerService } from '@app/core' | |||
17 | }) | 16 | }) |
18 | export class VideoTrendingComponent extends AbstractVideoList implements OnInit, OnDestroy { | 17 | export 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 @@ | |||
1 | import { Component, OnDestroy, OnInit } from '@angular/core' | 1 | import { Component, OnDestroy, OnInit } from '@angular/core' |
2 | import { ActivatedRoute, Router } from '@angular/router' | 2 | import { ActivatedRoute, Router } from '@angular/router' |
3 | import { immutableAssign } from '@app/shared/misc/utils' | 3 | import { immutableAssign } from '@app/shared/misc/utils' |
4 | import { Location } from '@angular/common' | ||
5 | import { AuthService } from '../../core/auth' | 4 | import { AuthService } from '../../core/auth' |
6 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' | 5 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' |
7 | import { VideoSortField } from '../../shared/video/sort-field.type' | 6 | import { VideoSortField } from '../../shared/video/sort-field.type' |
@@ -9,7 +8,7 @@ import { VideoService } from '../../shared/video/video.service' | |||
9 | import { I18n } from '@ngx-translate/i18n-polyfill' | 8 | import { I18n } from '@ngx-translate/i18n-polyfill' |
10 | import { ScreenService } from '@app/shared/misc/screen.service' | 9 | import { ScreenService } from '@app/shared/misc/screen.service' |
11 | import { OwnerDisplayType } from '@app/shared/video/video-miniature.component' | 10 | import { OwnerDisplayType } from '@app/shared/video/video-miniature.component' |
12 | import { Notifier } from '@app/core' | 11 | import { 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 | }) |
19 | export class VideoUserSubscriptionsComponent extends AbstractVideoList implements OnInit, OnDestroy { | 18 | export 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() |