diff options
Diffstat (limited to 'client/src/app/shared')
3 files changed, 16 insertions, 31 deletions
diff --git a/client/src/app/shared/video-channel/video-channel.service.ts b/client/src/app/shared/video-channel/video-channel.service.ts index d0bec649a..0168d37d9 100644 --- a/client/src/app/shared/video-channel/video-channel.service.ts +++ b/client/src/app/shared/video-channel/video-channel.service.ts | |||
@@ -2,7 +2,7 @@ import { catchError, map, tap } from 'rxjs/operators' | |||
2 | import { Injectable } from '@angular/core' | 2 | import { Injectable } from '@angular/core' |
3 | import { Observable, ReplaySubject } from 'rxjs' | 3 | import { Observable, ReplaySubject } from 'rxjs' |
4 | import { RestExtractor } from '../rest/rest-extractor.service' | 4 | import { RestExtractor } from '../rest/rest-extractor.service' |
5 | import { HttpClient } from '@angular/common/http' | 5 | import { HttpClient, HttpParams } from '@angular/common/http' |
6 | import { VideoChannel as VideoChannelServer, VideoChannelCreate, VideoChannelUpdate } from '../../../../../shared/models/videos' | 6 | import { VideoChannel as VideoChannelServer, VideoChannelCreate, VideoChannelUpdate } from '../../../../../shared/models/videos' |
7 | import { AccountService } from '../account/account.service' | 7 | import { AccountService } from '../account/account.service' |
8 | import { ResultList } from '../../../../../shared' | 8 | import { ResultList } from '../../../../../shared' |
@@ -10,6 +10,8 @@ import { VideoChannel } from './video-channel.model' | |||
10 | import { environment } from '../../../environments/environment' | 10 | import { environment } from '../../../environments/environment' |
11 | import { Account } from '@app/shared/account/account.model' | 11 | import { Account } from '@app/shared/account/account.model' |
12 | import { Avatar } from '../../../../../shared/models/avatars/avatar.model' | 12 | import { Avatar } from '../../../../../shared/models/avatars/avatar.model' |
13 | import { ComponentPagination } from '@app/shared/rest/component-pagination.model' | ||
14 | import { RestService } from '@app/shared/rest' | ||
13 | 15 | ||
14 | @Injectable() | 16 | @Injectable() |
15 | export class VideoChannelService { | 17 | export class VideoChannelService { |
@@ -29,6 +31,7 @@ export class VideoChannelService { | |||
29 | 31 | ||
30 | constructor ( | 32 | constructor ( |
31 | private authHttp: HttpClient, | 33 | private authHttp: HttpClient, |
34 | private restService: RestService, | ||
32 | private restExtractor: RestExtractor | 35 | private restExtractor: RestExtractor |
33 | ) { } | 36 | ) { } |
34 | 37 | ||
@@ -41,8 +44,16 @@ export class VideoChannelService { | |||
41 | ) | 44 | ) |
42 | } | 45 | } |
43 | 46 | ||
44 | listAccountVideoChannels (account: Account): Observable<ResultList<VideoChannel>> { | 47 | listAccountVideoChannels (account: Account, componentPagination?: ComponentPagination): Observable<ResultList<VideoChannel>> { |
45 | return this.authHttp.get<ResultList<VideoChannelServer>>(AccountService.BASE_ACCOUNT_URL + account.nameWithHost + '/video-channels') | 48 | const pagination = componentPagination |
49 | ? this.restService.componentPaginationToRestPagination(componentPagination) | ||
50 | : { start: 0, count: 20 } | ||
51 | |||
52 | let params = new HttpParams() | ||
53 | params = this.restService.addRestGetParams(params, pagination) | ||
54 | |||
55 | const url = AccountService.BASE_ACCOUNT_URL + account.nameWithHost + '/video-channels' | ||
56 | return this.authHttp.get<ResultList<VideoChannelServer>>(url, { params }) | ||
46 | .pipe( | 57 | .pipe( |
47 | map(res => VideoChannelService.extractVideoChannels(res)), | 58 | map(res => VideoChannelService.extractVideoChannels(res)), |
48 | catchError(err => this.restExtractor.handleError(err)) | 59 | catchError(err => this.restExtractor.handleError(err)) |
diff --git a/client/src/app/shared/video/abstract-video-list.html b/client/src/app/shared/video/abstract-video-list.html index 268677977..14f48b54b 100644 --- a/client/src/app/shared/video/abstract-video-list.html +++ b/client/src/app/shared/video/abstract-video-list.html | |||
@@ -6,7 +6,7 @@ | |||
6 | </div> | 6 | </div> |
7 | </div> | 7 | </div> |
8 | 8 | ||
9 | <my-feed [syndicationItems]="syndicationItems"></my-feed> | 9 | <my-feed *ngIf="titlePage" [syndicationItems]="syndicationItems"></my-feed> |
10 | 10 | ||
11 | <div class="moderation-block" *ngIf="displayModerationBlock"> | 11 | <div class="moderation-block" *ngIf="displayModerationBlock"> |
12 | <my-peertube-checkbox | 12 | <my-peertube-checkbox |
diff --git a/client/src/app/shared/video/abstract-video-list.scss b/client/src/app/shared/video/abstract-video-list.scss index 9d481d6e4..d94596113 100644 --- a/client/src/app/shared/video/abstract-video-list.scss +++ b/client/src/app/shared/video/abstract-video-list.scss | |||
@@ -25,32 +25,6 @@ | |||
25 | } | 25 | } |
26 | 26 | ||
27 | .margin-content { | 27 | .margin-content { |
28 | width: $video-miniature-width * 6; | 28 | @include adapt-margin-content-width; |
29 | margin: auto !important; | ||
30 | |||
31 | @media screen and (max-width: 1800px) { | ||
32 | width: $video-miniature-width * 5; | ||
33 | } | ||
34 | |||
35 | @media screen and (max-width: 1800px - $video-miniature-width) { | ||
36 | width: $video-miniature-width * 4; | ||
37 | } | ||
38 | |||
39 | @media screen and (max-width: 1800px - (2* $video-miniature-width)) { | ||
40 | width: $video-miniature-width * 3; | ||
41 | } | ||
42 | |||
43 | @media screen and (max-width: 1800px - (3* $video-miniature-width)) { | ||
44 | width: $video-miniature-width * 2; | ||
45 | } | ||
46 | |||
47 | @media screen and (max-width: 500px) { | ||
48 | width: auto; | ||
49 | margin: 0 !important; | ||
50 | |||
51 | .videos { | ||
52 | @include video-miniature-small-screen; | ||
53 | } | ||
54 | } | ||
55 | } | 29 | } |
56 | 30 | ||