Add filename in upload form title

pull/304/head
Chocobozzz 2018-02-20 09:53:42 +01:00
parent 3580fc00e4
commit 2f315e2f91
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,7 @@
<div class="margin-content"> <div class="margin-content">
<div class="title-page title-page-single"> <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>
<div *ngIf="!isUploadingVideo" class="upload-video-container"> <div *ngIf="!isUploadingVideo" class="upload-video-container">

View File

@ -37,6 +37,7 @@ export class VideoAddComponent extends FormReactive implements OnInit, OnDestroy
id: 0, id: 0,
uuid: '' uuid: ''
} }
videoFileName: string
form: FormGroup form: FormGroup
formErrors: { [ id: string ]: string } = {} formErrors: { [ id: string ]: string } = {}
@ -147,6 +148,8 @@ export class VideoAddComponent extends FormReactive implements OnInit, OnDestroy
return return
} }
this.videoFileName = videofile.name
const name = videofile.name.replace(/\.[^/.]+$/, '') const name = videofile.name.replace(/\.[^/.]+$/, '')
const privacy = this.firstStepPrivacyId.toString() const privacy = this.firstStepPrivacyId.toString()
const nsfw = false const nsfw = false