diff options
author | Chocobozzz <me@florianbigard.com> | 2019-09-05 10:19:35 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-09-05 10:19:35 +0200 |
commit | 00aab0666c6f772548c160fdfa871a8843b88f37 (patch) | |
tree | 73958f6f5d41371980f9653c8cb0ed8f46683c5a /client | |
parent | be04c6fdab5d91a7a57fa3ff36cde22a549c29da (diff) | |
parent | 951532924c1b3fd547cbf45f0c9cf9734203d6b4 (diff) | |
download | PeerTube-00aab0666c6f772548c160fdfa871a8843b88f37.tar.gz PeerTube-00aab0666c6f772548c160fdfa871a8843b88f37.tar.zst PeerTube-00aab0666c6f772548c160fdfa871a8843b88f37.zip |
Merge branch 'release/1.4.0' into develop
Diffstat (limited to 'client')
4 files changed, 10 insertions, 7 deletions
diff --git a/client/src/app/+signup/+register/register.component.html b/client/src/app/+signup/+register/register.component.html index e7440fe1e..906e29aed 100644 --- a/client/src/app/+signup/+register/register.component.html +++ b/client/src/app/+signup/+register/register.component.html | |||
@@ -10,7 +10,7 @@ | |||
10 | <div class="wrapper" [hidden]="signupDone"> | 10 | <div class="wrapper" [hidden]="signupDone"> |
11 | <div class="register-form"> | 11 | <div class="register-form"> |
12 | <my-custom-stepper linear *ngIf="!signupDone"> | 12 | <my-custom-stepper linear *ngIf="!signupDone"> |
13 | <cdk-step [stepControl]="formStepUser" i18n-label label="User information"> | 13 | <cdk-step [stepControl]="formStepUser" i18n-label label="User"> |
14 | <my-register-step-user | 14 | <my-register-step-user |
15 | [hasCodeOfConduct]="!!aboutHtml.codeOfConduct" | 15 | [hasCodeOfConduct]="!!aboutHtml.codeOfConduct" |
16 | (formBuilt)="onUserFormBuilt($event)" (termsClick)="onTermsClick()" (codeOfConductClick)="onCodeOfConductClick()" | 16 | (formBuilt)="onUserFormBuilt($event)" (termsClick)="onTermsClick()" (codeOfConductClick)="onCodeOfConductClick()" |
@@ -20,7 +20,7 @@ | |||
20 | <button i18n cdkStepperNext [disabled]="!formStepUser || !formStepUser.valid">Next</button> | 20 | <button i18n cdkStepperNext [disabled]="!formStepUser || !formStepUser.valid">Next</button> |
21 | </cdk-step> | 21 | </cdk-step> |
22 | 22 | ||
23 | <cdk-step [stepControl]="formStepChannel" i18n-label label="Channel information"> | 23 | <cdk-step [stepControl]="formStepChannel" i18n-label label="Channel"> |
24 | <my-register-step-channel (formBuilt)="onChannelFormBuilt($event)" [username]="getUsername()"></my-register-step-channel> | 24 | <my-register-step-channel (formBuilt)="onChannelFormBuilt($event)" [username]="getUsername()"></my-register-step-channel> |
25 | 25 | ||
26 | <button i18n cdkStepperNext (click)="signup()" | 26 | <button i18n cdkStepperNext (click)="signup()" |
diff --git a/client/src/app/shared/video-blacklist/video-blacklist.service.ts b/client/src/app/shared/video-blacklist/video-blacklist.service.ts index a9eab9b6f..d65da85fe 100644 --- a/client/src/app/shared/video-blacklist/video-blacklist.service.ts +++ b/client/src/app/shared/video-blacklist/video-blacklist.service.ts | |||
@@ -34,7 +34,7 @@ export class VideoBlacklistService { | |||
34 | ) | 34 | ) |
35 | } | 35 | } |
36 | 36 | ||
37 | getAutoBlacklistedAsVideoList (videoPagination: ComponentPagination): Observable<{ videos: Video[], totalVideos: number}> { | 37 | getAutoBlacklistedAsVideoList (videoPagination: ComponentPagination): Observable<ResultList<Video>> { |
38 | const pagination = this.restService.componentPaginationToRestPagination(videoPagination) | 38 | const pagination = this.restService.componentPaginationToRestPagination(videoPagination) |
39 | 39 | ||
40 | // prioritize first created since waiting longest | 40 | // prioritize first created since waiting longest |
@@ -48,9 +48,10 @@ export class VideoBlacklistService { | |||
48 | return this.authHttp.get<ResultList<VideoBlacklist>>(VideoBlacklistService.BASE_VIDEOS_URL + 'blacklist', { params }) | 48 | return this.authHttp.get<ResultList<VideoBlacklist>>(VideoBlacklistService.BASE_VIDEOS_URL + 'blacklist', { params }) |
49 | .pipe( | 49 | .pipe( |
50 | map(res => { | 50 | map(res => { |
51 | const videos = res.data.map(videoBlacklist => new Video(videoBlacklist.video)) | 51 | return { |
52 | const totalVideos = res.total | 52 | total: res.total, |
53 | return { videos, totalVideos } | 53 | data: res.data.map(videoBlacklist => new Video(videoBlacklist.video)) |
54 | } | ||
54 | }), | 55 | }), |
55 | catchError(res => this.restExtractor.handleError(res)) | 56 | catchError(res => this.restExtractor.handleError(res)) |
56 | ) | 57 | ) |
diff --git a/client/src/app/shared/video/video-miniature.component.html b/client/src/app/shared/video/video-miniature.component.html index 51ca1393d..5d5691b75 100644 --- a/client/src/app/shared/video/video-miniature.component.html +++ b/client/src/app/shared/video/video-miniature.component.html | |||
@@ -31,7 +31,7 @@ | |||
31 | 31 | ||
32 | <div class="video-info-privacy"> | 32 | <div class="video-info-privacy"> |
33 | <ng-container *ngIf="displayOptions.privacyText">{{ video.privacy.label }}</ng-container> | 33 | <ng-container *ngIf="displayOptions.privacyText">{{ video.privacy.label }}</ng-container> |
34 | <ng-container *ngIf="displayOptions.privacyText && getStateLabel(video)"> - </ng-container> | 34 | <ng-container *ngIf="displayOptions.privacyText && displayOptions.state && getStateLabel(video)"> - </ng-container> |
35 | <ng-container *ngIf="displayOptions.state">{{ getStateLabel(video) }}</ng-container> | 35 | <ng-container *ngIf="displayOptions.state">{{ getStateLabel(video) }}</ng-container> |
36 | </div> | 36 | </div> |
37 | 37 | ||
diff --git a/client/src/app/shared/video/video-miniature.component.ts b/client/src/app/shared/video/video-miniature.component.ts index 48475033c..d5c7dfd9b 100644 --- a/client/src/app/shared/video/video-miniature.component.ts +++ b/client/src/app/shared/video/video-miniature.component.ts | |||
@@ -95,6 +95,8 @@ export class VideoMiniatureComponent implements OnInit { | |||
95 | } | 95 | } |
96 | 96 | ||
97 | getStateLabel (video: Video) { | 97 | getStateLabel (video: Video) { |
98 | if (!video.state) return '' | ||
99 | |||
98 | if (video.privacy.id !== VideoPrivacy.PRIVATE && video.state.id === VideoState.PUBLISHED) { | 100 | if (video.privacy.id !== VideoPrivacy.PRIVATE && video.state.id === VideoState.PUBLISHED) { |
99 | return this.i18n('Published') | 101 | return this.i18n('Published') |
100 | } | 102 | } |