aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/angular
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-05-23 09:50:26 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-05-23 09:50:26 +0200
commit8140a704bbbecd149c68267545e4215579c9785c (patch)
tree405d1ba07eedb8244ac94aa7bcfab320e93ffe32 /client/angular
parent471bc22f19767c1cb1e7ba7ad0ddf0ff5f0e88f4 (diff)
downloadPeerTube-8140a704bbbecd149c68267545e4215579c9785c.tar.gz
PeerTube-8140a704bbbecd149c68267545e4215579c9785c.tar.zst
PeerTube-8140a704bbbecd149c68267545e4215579c9785c.zip
Use progress bar from bootstrap for the upload
Diffstat (limited to 'client/angular')
-rw-r--r--client/angular/videos/components/add/videos-add.component.html2
-rw-r--r--client/angular/videos/components/add/videos-add.component.ts7
-rw-r--r--client/angular/videos/components/watch/videos-watch.component.ts1
3 files changed, 8 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 @@
1import { Component, ElementRef, OnInit } from '@angular/core'; 1import { Component, ElementRef, OnInit } from '@angular/core';
2import { Router } from '@angular/router-deprecated'; 2import { Router } from '@angular/router-deprecated';
3 3
4import { PROGRESSBAR_DIRECTIVES } from 'ng2-bootstrap/components/progressbar';
5import { BytesPipe } from 'angular-pipes/src/math/bytes.pipe';
6
4import { AuthService } from '../../../users/services/auth.service'; 7import { AuthService } from '../../../users/services/auth.service';
5import { User } from '../../../users/models/user'; 8import { 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
16export class VideosAddComponent implements OnInit { 21export class VideosAddComponent implements OnInit {
diff --git a/client/angular/videos/components/watch/videos-watch.component.ts b/client/angular/videos/components/watch/videos-watch.component.ts
index 3eb005d07..6e212e8bc 100644
--- a/client/angular/videos/components/watch/videos-watch.component.ts
+++ b/client/angular/videos/components/watch/videos-watch.component.ts
@@ -1,5 +1,6 @@
1import { Component, OnInit, ElementRef } from '@angular/core'; 1import { Component, OnInit, ElementRef } from '@angular/core';
2import { RouteParams, CanDeactivate, ComponentInstruction } from '@angular/router-deprecated'; 2import { RouteParams, CanDeactivate, ComponentInstruction } from '@angular/router-deprecated';
3
3import { BytesPipe } from 'angular-pipes/src/math/bytes.pipe'; 4import { BytesPipe } from 'angular-pipes/src/math/bytes.pipe';
4 5
5// TODO import it with systemjs 6// TODO import it with systemjs