Display latest uploaded date for captions

This commit is contained in:
Chocobozzz 2022-07-25 10:45:22 +02:00
parent d65cd16551
commit 4f50475c67
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
5 changed files with 9 additions and 5 deletions

View File

@ -183,7 +183,7 @@
[href]="videoCaption.captionPath" [href]="videoCaption.captionPath"
>{{ videoCaption.language.label }}</a> >{{ videoCaption.language.label }}</a>
<div i18n class="caption-entry-state">Already uploaded &#10004;</div> <div i18n class="caption-entry-state">Already uploaded on {{ videoCaption.updatedAt | date }} &#10004;</div>
<span i18n class="caption-entry-edit" (click)="videoCaptionEditModal.show()">Edit</span> <span i18n class="caption-entry-edit" (click)="videoCaptionEditModal.show()">Edit</span>
<span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Delete</span> <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Delete</span>

View File

@ -41,7 +41,6 @@ my-peertube-checkbox {
a.caption-entry-label { a.caption-entry-label {
@include disable-default-a-behaviour; @include disable-default-a-behaviour;
flex-grow: 1;
color: #000; color: #000;
&:hover { &:hover {
@ -53,11 +52,13 @@ my-peertube-checkbox {
@include margin-right(20px); @include margin-right(20px);
font-weight: bold; font-weight: bold;
width: 150px; min-width: 100px;
} }
.caption-entry-state { .caption-entry-state {
width: 200px; @include margin-right(15px);
min-width: 250px;
&.caption-entry-state-create { &.caption-entry-state-create {
color: #39CC0B; color: #39CC0B;

View File

@ -6,6 +6,7 @@ export interface VideoCaptionEdit {
action?: 'CREATE' | 'REMOVE' | 'UPDATE' action?: 'CREATE' | 'REMOVE' | 'UPDATE'
captionfile?: any captionfile?: any
updatedAt?: string
} }
export type VideoCaptionWithPathEdit = VideoCaptionEdit & { captionPath?: string } export type VideoCaptionWithPathEdit = VideoCaptionEdit & { captionPath?: string }

View File

@ -195,7 +195,8 @@ export class VideoCaptionModel extends Model<Partial<AttributesOnly<VideoCaption
id: this.language, id: this.language,
label: VideoCaptionModel.getLanguageLabel(this.language) label: VideoCaptionModel.getLanguageLabel(this.language)
}, },
captionPath: this.getCaptionStaticPath() captionPath: this.getCaptionStaticPath(),
updatedAt: this.updatedAt.toISOString()
} }
} }

View File

@ -3,4 +3,5 @@ import { VideoConstant } from '../video-constant.model'
export interface VideoCaption { export interface VideoCaption {
language: VideoConstant<string> language: VideoConstant<string>
captionPath: string captionPath: string
updatedAt: string
} }