From 8140a704bbbecd149c68267545e4215579c9785c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 23 May 2016 09:50:26 +0200 Subject: Use progress bar from bootstrap for the upload --- client/angular/videos/components/add/videos-add.component.html | 2 +- client/angular/videos/components/add/videos-add.component.ts | 7 ++++++- client/angular/videos/components/watch/videos-watch.component.ts | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) (limited to 'client') 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 @@
- + {{ progressBar.value | bytes }} / {{ progressBar.max | bytes }}
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 @@ import { Component, ElementRef, OnInit } from '@angular/core'; import { Router } from '@angular/router-deprecated'; +import { PROGRESSBAR_DIRECTIVES } from 'ng2-bootstrap/components/progressbar'; +import { BytesPipe } from 'angular-pipes/src/math/bytes.pipe'; + import { AuthService } from '../../../users/services/auth.service'; import { User } from '../../../users/models/user'; @@ -10,7 +13,9 @@ declare var jQuery:any; @Component({ selector: 'my-videos-add', styleUrls: [ 'app/angular/videos/components/add/videos-add.component.css' ], - templateUrl: 'app/angular/videos/components/add/videos-add.component.html' + templateUrl: 'app/angular/videos/components/add/videos-add.component.html', + directives: [ PROGRESSBAR_DIRECTIVES ], + pipes: [ BytesPipe ] }) export 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 @@ import { Component, OnInit, ElementRef } from '@angular/core'; import { RouteParams, CanDeactivate, ComponentInstruction } from '@angular/router-deprecated'; + import { BytesPipe } from 'angular-pipes/src/math/bytes.pipe'; // TODO import it with systemjs -- cgit v1.2.3