aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/app/videos
diff options
context:
space:
mode:
Diffstat (limited to 'client/app/videos')
-rw-r--r--client/app/videos/video-add/video-add.component.ts6
-rw-r--r--client/app/videos/video-list/video-list.component.html2
-rw-r--r--client/app/videos/video-list/video-list.component.ts4
3 files changed, 8 insertions, 4 deletions
diff --git a/client/app/videos/video-add/video-add.component.ts b/client/app/videos/video-add/video-add.component.ts
index b11475ae9..eb10aedeb 100644
--- a/client/app/videos/video-add/video-add.component.ts
+++ b/client/app/videos/video-add/video-add.component.ts
@@ -25,9 +25,9 @@ export class VideoAddComponent implements OnInit {
25 private form: any; 25 private form: any;
26 26
27 constructor( 27 constructor(
28 private router: Router, 28 private authService: AuthService,
29 private elementRef: ElementRef, 29 private elementRef: ElementRef,
30 private authService: AuthService 30 private router: Router
31 ) {} 31 ) {}
32 32
33 ngOnInit() { 33 ngOnInit() {
@@ -62,8 +62,8 @@ export class VideoAddComponent implements OnInit {
62 } 62 }
63 63
64 uploadFile() { 64 uploadFile() {
65 this.form.headers = this.authService.getRequestHeader().toJSON();
66 this.form.formData = jQuery(this.elementRef.nativeElement).find('form').serializeArray(); 65 this.form.formData = jQuery(this.elementRef.nativeElement).find('form').serializeArray();
66 this.form.headers = this.authService.getRequestHeader().toJSON();
67 this.form.submit(); 67 this.form.submit();
68 } 68 }
69} 69}
diff --git a/client/app/videos/video-list/video-list.component.html b/client/app/videos/video-list/video-list.component.html
index edbbaf3ae..80b1e7b1b 100644
--- a/client/app/videos/video-list/video-list.component.html
+++ b/client/app/videos/video-list/video-list.component.html
@@ -6,7 +6,7 @@
6<div class="videos-miniatures"> 6<div class="videos-miniatures">
7 <my-loader [loading]="loading"></my-loader> 7 <my-loader [loading]="loading"></my-loader>
8 8
9 <div class="col-md-12 no-video" *ngIf="!loading && videos.length === 0">There is no video.</div> 9 <div class="col-md-12 no-video" *ngIf="noVideo()">There is no video.</div>
10 10
11 <my-video-miniature *ngFor="let video of videos" [video]="video" [user]="user" (removed)="onRemoved(video)"> 11 <my-video-miniature *ngFor="let video of videos" [video]="video" [user]="user" (removed)="onRemoved(video)">
12 </my-video-miniature> 12 </my-video-miniature>
diff --git a/client/app/videos/video-list/video-list.component.ts b/client/app/videos/video-list/video-list.component.ts
index 23b97df32..131578681 100644
--- a/client/app/videos/video-list/video-list.component.ts
+++ b/client/app/videos/video-list/video-list.component.ts
@@ -80,6 +80,10 @@ export class VideoListComponent implements OnInit {
80 ); 80 );
81 } 81 }
82 82
83 noVideo() {
84 return !this.loading && this.videos.length === 0;
85 }
86
83 onRemoved(video: Video) { 87 onRemoved(video: Video) {
84 this.videos.splice(this.videos.indexOf(video), 1); 88 this.videos.splice(this.videos.indexOf(video), 1);
85 } 89 }