diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-05-23 09:50:26 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-05-23 09:50:26 +0200 |
commit | 8140a704bbbecd149c68267545e4215579c9785c (patch) | |
tree | 405d1ba07eedb8244ac94aa7bcfab320e93ffe32 /client/angular/videos/components/add | |
parent | 471bc22f19767c1cb1e7ba7ad0ddf0ff5f0e88f4 (diff) | |
download | PeerTube-8140a704bbbecd149c68267545e4215579c9785c.tar.gz PeerTube-8140a704bbbecd149c68267545e4215579c9785c.tar.zst PeerTube-8140a704bbbecd149c68267545e4215579c9785c.zip |
Use progress bar from bootstrap for the upload
Diffstat (limited to 'client/angular/videos/components/add')
-rw-r--r-- | client/angular/videos/components/add/videos-add.component.html | 2 | ||||
-rw-r--r-- | client/angular/videos/components/add/videos-add.component.ts | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/client/angular/videos/components/add/videos-add.component.html b/client/angular/videos/components/add/videos-add.component.html index 7336ad0c0..80d229cb8 100644 --- a/client/angular/videos/components/add/videos-add.component.html +++ b/client/angular/videos/components/add/videos-add.component.html | |||
@@ -34,7 +34,7 @@ | |||
34 | </div> | 34 | </div> |
35 | 35 | ||
36 | <div id="progress" *ngIf="progressBar.max !== 0"> | 36 | <div id="progress" *ngIf="progressBar.max !== 0"> |
37 | <progress [value]="progressBar.value" [max]="progressBar.max"></progress> | 37 | <progressbar [value]="progressBar.value" [max]="progressBar.max">{{ progressBar.value | bytes }} / {{ progressBar.max | bytes }}</progressbar> |
38 | </div> | 38 | </div> |
39 | 39 | ||
40 | <input type="submit" value="Upload" class="btn btn-default" [disabled]="!videoForm.form.valid || !fileToUpload"> | 40 | <input type="submit" value="Upload" class="btn btn-default" [disabled]="!videoForm.form.valid || !fileToUpload"> |
diff --git a/client/angular/videos/components/add/videos-add.component.ts b/client/angular/videos/components/add/videos-add.component.ts index f801cecbb..f1652be19 100644 --- a/client/angular/videos/components/add/videos-add.component.ts +++ b/client/angular/videos/components/add/videos-add.component.ts | |||
@@ -1,6 +1,9 @@ | |||
1 | import { Component, ElementRef, OnInit } from '@angular/core'; | 1 | import { Component, ElementRef, OnInit } from '@angular/core'; |
2 | import { Router } from '@angular/router-deprecated'; | 2 | import { Router } from '@angular/router-deprecated'; |
3 | 3 | ||
4 | import { PROGRESSBAR_DIRECTIVES } from 'ng2-bootstrap/components/progressbar'; | ||
5 | import { BytesPipe } from 'angular-pipes/src/math/bytes.pipe'; | ||
6 | |||
4 | import { AuthService } from '../../../users/services/auth.service'; | 7 | import { AuthService } from '../../../users/services/auth.service'; |
5 | import { User } from '../../../users/models/user'; | 8 | import { User } from '../../../users/models/user'; |
6 | 9 | ||
@@ -10,7 +13,9 @@ declare var jQuery:any; | |||
10 | @Component({ | 13 | @Component({ |
11 | selector: 'my-videos-add', | 14 | selector: 'my-videos-add', |
12 | styleUrls: [ 'app/angular/videos/components/add/videos-add.component.css' ], | 15 | styleUrls: [ 'app/angular/videos/components/add/videos-add.component.css' ], |
13 | templateUrl: 'app/angular/videos/components/add/videos-add.component.html' | 16 | templateUrl: 'app/angular/videos/components/add/videos-add.component.html', |
17 | directives: [ PROGRESSBAR_DIRECTIVES ], | ||
18 | pipes: [ BytesPipe ] | ||
14 | }) | 19 | }) |
15 | 20 | ||
16 | export class VideosAddComponent implements OnInit { | 21 | export class VideosAddComponent implements OnInit { |