import { UserService } from './users'
import { VideoAbuseService } from './video-abuse'
import { VideoBlacklistService } from './video-blacklist'
+import { LoaderComponent } from './misc/loader.component'
@NgModule({
imports: [
declarations: [
BytesPipe,
KeysPipe,
- SearchComponent
+ SearchComponent,
+ LoaderComponent
],
exports: [
BytesPipe,
KeysPipe,
- SearchComponent
+ SearchComponent,
+ LoaderComponent
],
providers: [
import { TagInputModule } from 'ngx-chips'
import { TabsModule } from 'ngx-bootstrap/tabs'
-import { VideoService, MarkdownService, VideoDescriptionComponent } from '../shared'
-import { SharedModule } from '../../shared'
+import { VideoService, MarkdownService, VideoDescriptionComponent } from '../../shared'
+import { SharedModule } from '../../../shared'
@NgModule({
imports: [
@Component({
selector: 'my-videos-add',
- styleUrls: [ './video-edit.component.scss' ],
+ styleUrls: [ './shared/video-edit.component.scss' ],
templateUrl: './video-add.component.html'
})
import { NgModule } from '@angular/core'
-
+import { SharedModule } from '../../shared'
+import { VideoEditModule } from './shared/video-edit.module'
import { VideoAddRoutingModule } from './video-add-routing.module'
import { VideoAddComponent } from './video-add.component'
-import { VideoEditModule } from './video-edit.module'
-import { SharedModule } from '../../shared'
@NgModule({
imports: [
@Component({
selector: 'my-videos-update',
- styleUrls: [ './video-edit.component.scss' ],
+ styleUrls: [ './shared/video-edit.component.scss' ],
templateUrl: './video-update.component.html'
})
import { NgModule } from '@angular/core'
-
+import { SharedModule } from '../../shared'
+import { VideoEditModule } from './shared/video-edit.module'
import { VideoUpdateRoutingModule } from './video-update-routing.module'
import { VideoUpdateComponent } from './video-update.component'
-import { VideoEditModule } from './video-edit.module'
-import { SharedModule } from '../../shared'
@NgModule({
imports: [
<div class="video-details-description" [innerHTML]="videoHTMLDescription"></div>
- <div *ngIf="completeDescriptionShown === false && video.description.length === 250" (click)="showMoreDescription()" class="video-details-description-more">
+ <div class="video-details-description-more" *ngIf="completeDescriptionShown === false && video.description.length === 250" (click)="showMoreDescription()">
Show more
- <span class="glyphicon glyphicon-menu-down"></span>
+ <span *ngIf="descriptionLoading === false" class="glyphicon glyphicon-menu-down"></span>
+ <my-loader class="description-loading" [loading]="descriptionLoading"></my-loader>
</div>
<div *ngIf="completeDescriptionShown === true" (click)="showLessDescription()" class="video-details-description-more">
Show less
- <span class="glyphicon glyphicon-menu-up"></span>
+ <span *ngIf="descriptionLoading === false" class="glyphicon glyphicon-menu-up"></span>
</div>
</div>
.video-details-date-description {
padding-left: $video-watch-info-padding-left;
+ .description-loading {
+ display: inline-block;
+ }
+
.video-details-date {
font-weight: bold;
margin-bottom: 30px;
import { VideoDetails, VideoService, MarkdownService } from '../shared'
import { VideoBlacklistService } from '../../shared'
import { UserVideoRateType, VideoRateType } from '../../../../../shared'
+import { BehaviorSubject } from 'rxjs/BehaviorSubject'
@Component({
selector: 'my-video-watch',
video: VideoDetails = null
videoPlayerLoaded = false
videoNotFound = false
+ descriptionLoading = false
completeDescriptionShown = false
completeVideoDescription: string
}
showMoreDescription () {
- this.completeDescriptionShown = true
-
if (this.completeVideoDescription === undefined) {
return this.loadCompleteDescription()
}
this.updateVideoDescription(this.completeVideoDescription)
+ this.completeDescriptionShown = true
}
showLessDescription () {
- this.completeDescriptionShown = false
this.updateVideoDescription(this.shortVideoDescription)
+ this.completeDescriptionShown = false
}
loadCompleteDescription () {
+ this.descriptionLoading = true
+
this.videoService.loadCompleteDescription(this.video.descriptionPath)
.subscribe(
description => {
+ this.completeDescriptionShown = true
+ this.descriptionLoading = false
+
this.shortVideoDescription = this.video.description
this.completeVideoDescription = description
this.updateVideoDescription(this.completeVideoDescription)
},
- error => this.notificationsService.error('Error', error.text)
+ error => {
+ this.descriptionLoading = false
+ this.notificationsService.error('Error', error.text)
+ }
)
}
export * from './abstract-video-list'
-export * from './loader.component'
export * from './video-miniature.component'
export * from './video-sort.component'
import { NgModule } from '@angular/core'
-
+import { SharedModule } from '../shared'
+import { VideoService } from './shared'
+import { MyVideosComponent, VideoListComponent, VideoMiniatureComponent, VideoSortComponent } from './video-list'
import { VideosRoutingModule } from './videos-routing.module'
import { VideosComponent } from './videos.component'
-import {
- LoaderComponent,
- VideoListComponent,
- MyVideosComponent,
- VideoMiniatureComponent,
- VideoSortComponent
-} from './video-list'
-import { VideoService } from './shared'
-import { SharedModule } from '../shared'
@NgModule({
imports: [
VideoListComponent,
MyVideosComponent,
VideoMiniatureComponent,
- VideoSortComponent,
-
- LoaderComponent
+ VideoSortComponent
],
exports: [