aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+my-account')
-rw-r--r--client/src/app/+my-account/my-account-videos/my-account-videos.component.html6
-rw-r--r--client/src/app/+my-account/my-account-videos/my-account-videos.component.scss1
-rw-r--r--client/src/app/+my-account/my-account-videos/my-account-videos.component.ts29
3 files changed, 25 insertions, 11 deletions
diff --git a/client/src/app/+my-account/my-account-videos/my-account-videos.component.html b/client/src/app/+my-account/my-account-videos/my-account-videos.component.html
index eb24de7a7..7ac6371db 100644
--- a/client/src/app/+my-account/my-account-videos/my-account-videos.component.html
+++ b/client/src/app/+my-account/my-account-videos/my-account-videos.component.html
@@ -18,7 +18,7 @@
18 <div class="video-info"> 18 <div class="video-info">
19 <a class="video-info-name" [routerLink]="['/videos/watch', video.uuid]" [attr.title]="video.name">{{ video.name }}</a> 19 <a class="video-info-name" [routerLink]="['/videos/watch', video.uuid]" [attr.title]="video.name">{{ video.name }}</a>
20 <span i18n class="video-info-date-views">{{ video.createdAt | myFromNow }} - {{ video.views | myNumberFormatter }} views</span> 20 <span i18n class="video-info-date-views">{{ video.createdAt | myFromNow }} - {{ video.views | myNumberFormatter }} views</span>
21 <div class="video-info-private">{{ video.privacy.label }} - {{ getStateLabel(video) }}</div> 21 <div class="video-info-private">{{ video.privacy.label }}{{ getStateLabel(video) }}</div>
22 </div> 22 </div>
23 23
24 <!-- Display only once --> 24 <!-- Display only once -->
@@ -28,9 +28,9 @@
28 Cancel 28 Cancel
29 </span> 29 </span>
30 30
31 <span i18n class="action-button action-button-delete-selection" (click)="deleteSelectedVideos()"> 31 <span class="action-button action-button-delete-selection" (click)="deleteSelectedVideos()">
32 <span class="icon icon-delete-white"></span> 32 <span class="icon icon-delete-white"></span>
33 Delete 33 <ng-container i18n>Delete</ng-container>
34 </span> 34 </span>
35 </div> 35 </div>
36 </div> 36 </div>
diff --git a/client/src/app/+my-account/my-account-videos/my-account-videos.component.scss b/client/src/app/+my-account/my-account-videos/my-account-videos.component.scss
index f276ea389..1f22aec71 100644
--- a/client/src/app/+my-account/my-account-videos/my-account-videos.component.scss
+++ b/client/src/app/+my-account/my-account-videos/my-account-videos.component.scss
@@ -75,6 +75,7 @@
75 75
76 color: #000; 76 color: #000;
77 display: block; 77 display: block;
78 width: fit-content;
78 font-size: 16px; 79 font-size: 16px;
79 font-weight: $font-semibold; 80 font-weight: $font-semibold;
80 } 81 }
diff --git a/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts b/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts
index afc01073c..e698b75ec 100644
--- a/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts
+++ b/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts
@@ -1,6 +1,6 @@
1import { from as observableFrom, Observable } from 'rxjs' 1import { from as observableFrom, Observable } from 'rxjs'
2import { concatAll, tap } from 'rxjs/operators' 2import { concatAll, tap } from 'rxjs/operators'
3import { Component, OnDestroy, OnInit } from '@angular/core' 3import { Component, OnDestroy, OnInit, Inject, LOCALE_ID } from '@angular/core'
4import { ActivatedRoute, Router } from '@angular/router' 4import { ActivatedRoute, Router } from '@angular/router'
5import { Location } from '@angular/common' 5import { Location } from '@angular/common'
6import { immutableAssign } from '@app/shared/misc/utils' 6import { immutableAssign } from '@app/shared/misc/utils'
@@ -12,7 +12,8 @@ import { AbstractVideoList } from '../../shared/video/abstract-video-list'
12import { Video } from '../../shared/video/video.model' 12import { Video } from '../../shared/video/video.model'
13import { VideoService } from '../../shared/video/video.service' 13import { VideoService } from '../../shared/video/video.service'
14import { I18n } from '@ngx-translate/i18n-polyfill' 14import { I18n } from '@ngx-translate/i18n-polyfill'
15import { VideoState } from '../../../../../shared/models/videos' 15import { VideoPrivacy, VideoState } from '../../../../../shared/models/videos'
16import { ScreenService } from '@app/shared/misc/screen.service'
16 17
17@Component({ 18@Component({
18 selector: 'my-account-videos', 19 selector: 'my-account-videos',
@@ -39,8 +40,10 @@ export class MyAccountVideosComponent extends AbstractVideoList implements OnIni
39 protected notificationsService: NotificationsService, 40 protected notificationsService: NotificationsService,
40 protected confirmService: ConfirmService, 41 protected confirmService: ConfirmService,
41 protected location: Location, 42 protected location: Location,
43 protected screenService: ScreenService,
42 protected i18n: I18n, 44 protected i18n: I18n,
43 private videoService: VideoService 45 private videoService: VideoService,
46 @Inject(LOCALE_ID) private localeId: string
44 ) { 47 ) {
45 super() 48 super()
46 49
@@ -131,12 +134,22 @@ export class MyAccountVideosComponent extends AbstractVideoList implements OnIni
131 } 134 }
132 135
133 getStateLabel (video: Video) { 136 getStateLabel (video: Video) {
134 if (video.state.id === VideoState.PUBLISHED) return this.i18n('Published') 137 let suffix: string
135 138
136 if (video.state.id === VideoState.TO_TRANSCODE && video.waitTranscoding === true) return this.i18n('Waiting transcoding') 139 if (video.privacy.id !== VideoPrivacy.PRIVATE && video.state.id === VideoState.PUBLISHED) {
137 if (video.state.id === VideoState.TO_TRANSCODE) return this.i18n('To transcode') 140 suffix = this.i18n('Published')
141 } else if (video.scheduledUpdate) {
142 const updateAt = new Date(video.scheduledUpdate.updateAt.toString()).toLocaleString(this.localeId)
143 suffix = this.i18n('Publication scheduled on ') + updateAt
144 } else if (video.state.id === VideoState.TO_TRANSCODE && video.waitTranscoding === true) {
145 suffix = this.i18n('Waiting transcoding')
146 } else if (video.state.id === VideoState.TO_TRANSCODE) {
147 suffix = this.i18n('To transcode')
148 } else {
149 return ''
150 }
138 151
139 return this.i18n('Unknown state') 152 return ' - ' + suffix
140 } 153 }
141 154
142 protected buildVideoHeight () { 155 protected buildVideoHeight () {