--- /dev/null
+<div id="video-loading" *ngIf="loading">
+ <div class="glyphicon glyphicon-refresh glyphicon-refresh-animate"></div>
+</div>
--- /dev/null
+import { Component, Input } from '@angular/core'
+
+@Component({
+ selector: 'my-loader',
+ styleUrls: [ ],
+ templateUrl: './loader.component.html'
+})
+
+export class LoaderComponent {
+ @Input() loading: boolean
+}
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: [
--- /dev/null
+.btn-file {
+ position: relative;
+ overflow: hidden;
+ display: block;
+}
+
+.btn-file input[type=file] {
+ position: absolute;
+ top: 0;
+ right: 0;
+ min-width: 100%;
+ min-height: 100%;
+ font-size: 100px;
+ text-align: right;
+ filter: alpha(opacity=0);
+ opacity: 0;
+ outline: none;
+ background: white;
+ cursor: inherit;
+ display: block;
+}
+
+.form-group {
+ margin-bottom: 10px;
+}
+
+div.tags {
+ height: 40px;
+ font-size: 20px;
+ margin-top: 20px;
+
+ .tag {
+ margin-right: 10px;
+
+ .remove {
+ cursor: pointer;
+ }
+ }
+}
+
+div.file-to-upload {
+ height: 40px;
+
+ .glyphicon-remove {
+ cursor: pointer;
+ }
+}
+
+.little-information {
+ font-size: 0.8em;
+ font-style: italic;
+}
+
+.label-tags {
+ margin-bottom: 0;
+}
--- /dev/null
+import { NgModule } from '@angular/core'
+
+import { TagInputModule } from 'ngx-chips'
+import { TabsModule } from 'ngx-bootstrap/tabs'
+
+import { VideoService, MarkdownService, VideoDescriptionComponent } from '../../shared'
+import { SharedModule } from '../../../shared'
+
+@NgModule({
+ imports: [
+ TagInputModule,
+ TabsModule.forRoot(),
+
+ SharedModule
+ ],
+
+ declarations: [
+ VideoDescriptionComponent
+ ],
+
+ exports: [
+ TagInputModule,
+ TabsModule,
+
+ VideoDescriptionComponent
+ ],
+
+ providers: [
+ VideoService,
+ MarkdownService
+ ]
+})
+export class VideoEditModule { }
@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: [
+++ /dev/null
-.btn-file {
- position: relative;
- overflow: hidden;
- display: block;
-}
-
-.btn-file input[type=file] {
- position: absolute;
- top: 0;
- right: 0;
- min-width: 100%;
- min-height: 100%;
- font-size: 100px;
- text-align: right;
- filter: alpha(opacity=0);
- opacity: 0;
- outline: none;
- background: white;
- cursor: inherit;
- display: block;
-}
-
-.form-group {
- margin-bottom: 10px;
-}
-
-div.tags {
- height: 40px;
- font-size: 20px;
- margin-top: 20px;
-
- .tag {
- margin-right: 10px;
-
- .remove {
- cursor: pointer;
- }
- }
-}
-
-div.file-to-upload {
- height: 40px;
-
- .glyphicon-remove {
- cursor: pointer;
- }
-}
-
-.little-information {
- font-size: 0.8em;
- font-style: italic;
-}
-
-.label-tags {
- margin-bottom: 0;
-}
+++ /dev/null
-import { NgModule } from '@angular/core'
-
-import { TagInputModule } from 'ngx-chips'
-import { TabsModule } from 'ngx-bootstrap/tabs'
-
-import { VideoService, MarkdownService, VideoDescriptionComponent } from '../shared'
-import { SharedModule } from '../../shared'
-
-@NgModule({
- imports: [
- TagInputModule,
- TabsModule.forRoot(),
-
- SharedModule
- ],
-
- declarations: [
- VideoDescriptionComponent
- ],
-
- exports: [
- TagInputModule,
- TabsModule,
-
- VideoDescriptionComponent
- ],
-
- providers: [
- VideoService,
- MarkdownService
- ]
-})
-export class VideoEditModule { }
@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'
+++ /dev/null
-<div id="video-loading" *ngIf="loading">
- <div class="glyphicon glyphicon-refresh glyphicon-refresh-animate"></div>
-</div>
+++ /dev/null
-import { Component, Input } from '@angular/core'
-
-@Component({
- selector: 'my-loader',
- styleUrls: [ ],
- templateUrl: './loader.component.html'
-})
-
-export class LoaderComponent {
- @Input() loading: boolean
-}
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: [