]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Display latest uploaded date for captions
authorChocobozzz <me@florianbigard.com>
Mon, 25 Jul 2022 08:45:22 +0000 (10:45 +0200)
committerChocobozzz <me@florianbigard.com>
Mon, 25 Jul 2022 08:45:40 +0000 (10:45 +0200)
client/src/app/+videos/+video-edit/shared/video-edit.component.html
client/src/app/+videos/+video-edit/shared/video-edit.component.scss
client/src/app/shared/shared-main/video-caption/video-caption-edit.model.ts
server/models/video/video-caption.ts
shared/models/videos/caption/video-caption.model.ts

index 650448a74165e6c3548d21a87635d5b9deb9b601..2892d603dee9375e5a81069ed457bebc29c398a1 100644 (file)
                   [href]="videoCaption.captionPath"
                 >{{ 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-delete" (click)="deleteCaption(videoCaption)">Delete</span>
index e8a6c6e420d00cbfd7fd40527957f1679dbb54bd..a8075cc6d6fe07c5b1fe690b789df07adf5a0223 100644 (file)
@@ -41,7 +41,6 @@ my-peertube-checkbox {
   a.caption-entry-label {
     @include disable-default-a-behaviour;
 
-    flex-grow: 1;
     color: #000;
 
     &:hover {
@@ -53,11 +52,13 @@ my-peertube-checkbox {
     @include margin-right(20px);
 
     font-weight: bold;
-    width: 150px;
+    min-width: 100px;
   }
 
   .caption-entry-state {
-    width: 200px;
+    @include margin-right(15px);
+
+    min-width: 250px;
 
     &.caption-entry-state-create {
       color: #39CC0B;
index 129e80bc0c3b8b93e3f644af810edab9ce6fdc97..8d578cae620ac3d6693176e6996fe8a2eb44929a 100644 (file)
@@ -6,6 +6,7 @@ export interface VideoCaptionEdit {
 
   action?: 'CREATE' | 'REMOVE' | 'UPDATE'
   captionfile?: any
+  updatedAt?: string
 }
 
 export type VideoCaptionWithPathEdit = VideoCaptionEdit & { captionPath?: string }
index 6b240f11688fd3edbbeafe916df823630e0bda70..5fbcd6e3b9f278512ff3091b1e97dad8d01c1c8e 100644 (file)
@@ -195,7 +195,8 @@ export class VideoCaptionModel extends Model<Partial<AttributesOnly<VideoCaption
         id: this.language,
         label: VideoCaptionModel.getLanguageLabel(this.language)
       },
-      captionPath: this.getCaptionStaticPath()
+      captionPath: this.getCaptionStaticPath(),
+      updatedAt: this.updatedAt.toISOString()
     }
   }
 
index d3c73e1a679ae6d8176b75455a6cc07cc87eb543..6d56650063d0769e98bc3dbe0dbc8f9ddcf18df8 100644 (file)
@@ -3,4 +3,5 @@ import { VideoConstant } from '../video-constant.model'
 export interface VideoCaption {
   language: VideoConstant<string>
   captionPath: string
+  updatedAt: string
 }