navs: true
navbar: false
breadcrumbs: false
- pagination: true
+ pagination: false
pager: false
- labels: true
+ labels: false
badges: false
jumbotron: false
- thumbnails: true
+ thumbnails: false
alerts: true
- progress-bars: true
+ progress-bars: false
media: true
list-group: false
panels: true
wells: false
- responsive-embed: true
+ responsive-embed: false
close: true
# Components w/ JavaScript
import { BsDropdownModule } from 'ngx-bootstrap/dropdown'
import { ModalModule } from 'ngx-bootstrap/modal'
-import { ProgressbarModule } from 'ngx-bootstrap/progressbar'
import { InfiniteScrollModule } from 'ngx-infinite-scroll'
import { BytesPipe, KeysPipe, NgPipesModule } from 'ngx-pipes'
import { SharedModule as PrimeSharedModule } from 'primeng/components/common/shared'
BsDropdownModule.forRoot(),
ModalModule.forRoot(),
- ProgressbarModule.forRoot(),
DataTableModule,
PrimeSharedModule,
BsDropdownModule,
ModalModule,
- ProgressbarModule,
DataTableModule,
PrimeSharedModule,
InfiniteScrollModule,
</div>
</div>
+ <p-progressBar *ngIf="isUploadingVideo" [value]="videoUploadPercents"></p-progressBar>
+
<!-- Hidden because we need to load the component -->
<form [hidden]="!isUploadingVideo" novalidate [formGroup]="form">
<my-video-edit
}
}
+p-progressBar {
+ margin-top: 50px;
+ margin-bottom: 40px;
+
+ /deep/ .ui-progressbar {
+ font-size: 15px !important;
+ color: #fff !important;
+ height: 30px !important;
+ line-height: 30px !important;
+ border-radius: 3px !important;
+ background-color: rgba(11, 204, 41, 0.16) !important;
+
+ .ui-progressbar-value {
+ background-color: #0BCC29 !important;
+ }
+
+ .ui-progressbar-label {
+ text-align: left;
+ padding-left: 18px;
+ }
+ }
+}
+
isUploadingVideo = false
videoUploaded = false
- progressPercent = 0
+ videoUploadPercents = 0
error: string = null
form: FormGroup
ngOnInit () {
this.buildForm()
- this.serverService.videoCategoriesLoaded
+ this.serverService.videoPrivaciesLoaded
.subscribe(
() => {
this.videoPrivacies = this.serverService.getVideoPrivacies()
this.videoService.uploadVideo(formData).subscribe(
event => {
if (event.type === HttpEventType.UploadProgress) {
- this.progressPercent = Math.round(100 * event.loaded / event.total)
+ this.videoUploadPercents = Math.round(100 * event.loaded / event.total)
} else if (event instanceof HttpResponse) {
console.log('Video uploaded.')
err => {
// Reset progress
- this.progressPercent = 0
+ this.videoUploadPercents = 0
this.error = err.message
}
)
import { NgModule } from '@angular/core'
+import { ProgressBarModule } from 'primeng/primeng'
import { SharedModule } from '../../shared'
import { VideoEditModule } from './shared/video-edit.module'
import { VideoAddRoutingModule } from './video-add-routing.module'
imports: [
VideoAddRoutingModule,
VideoEditModule,
- SharedModule
+ SharedModule,
+ ProgressBarModule
],
declarations: [