]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Add filename in upload form title
authorChocobozzz <me@florianbigard.com>
Tue, 20 Feb 2018 08:53:42 +0000 (09:53 +0100)
committerChocobozzz <me@florianbigard.com>
Tue, 20 Feb 2018 08:53:42 +0000 (09:53 +0100)
client/src/app/videos/+video-edit/video-add.component.html
client/src/app/videos/+video-edit/video-add.component.ts

index 6dcf5bf7553534ade14c77740c49a84431299d7c..440556562b72bf39a53f981c5381a9bf628145bc 100644 (file)
@@ -1,6 +1,7 @@
 <div class="margin-content">
   <div class="title-page title-page-single">
-    Upload your video
+    <ng-template [ngIf]="!videoFileName">Upload your video</ng-template>
+    <ng-template [ngIf]="videoFileName">Upload {{ videoFileName }}</ng-template>
   </div>
 
   <div *ngIf="!isUploadingVideo" class="upload-video-container">
index 75d6081626e2e331ac18bd497cf669003b229f7e..e81243d3e70556af2fde0ce9ef5e942afe3fdbb7 100644 (file)
@@ -37,6 +37,7 @@ export class VideoAddComponent extends FormReactive implements OnInit, OnDestroy
     id: 0,
     uuid: ''
   }
+  videoFileName: string
 
   form: FormGroup
   formErrors: { [ id: string ]: string } = {}
@@ -147,6 +148,8 @@ export class VideoAddComponent extends FormReactive implements OnInit, OnDestroy
       return
     }
 
+    this.videoFileName = videofile.name
+
     const name = videofile.name.replace(/\.[^/.]+$/, '')
     const privacy = this.firstStepPrivacyId.toString()
     const nsfw = false