From a02b93ce756d646a59cef57b5e4ff53c2bb30bec Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 6 Aug 2020 16:14:58 +0200 Subject: Fix lint --- .../video-add-components/video-import-torrent.component.ts | 6 +++--- .../video-add-components/video-import-url.component.ts | 6 +++--- .../app/+videos/+video-edit/video-add-components/video-send.ts | 9 +++++---- client/src/app/+videos/+video-edit/video-update.component.ts | 6 +++--- 4 files changed, 14 insertions(+), 13 deletions(-) (limited to 'client/src/app/+videos') diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts index 538a187a8..3a8e6eecc 100644 --- a/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts +++ b/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts @@ -84,11 +84,11 @@ export class VideoImportTorrentComponent extends VideoSend implements OnInit, Ca channelId: this.firstStepChannelId } - this.loadingBar.start() + this.loadingBar.useRef().start() this.videoImportService.importVideoTorrent(torrentfile || this.magnetUri, videoUpdate).subscribe( res => { - this.loadingBar.complete() + this.loadingBar.useRef().complete() this.firstStepDone.emit(res.video.name) this.isImportingVideo = false this.hasImportedVideo = true @@ -105,7 +105,7 @@ export class VideoImportTorrentComponent extends VideoSend implements OnInit, Ca }, err => { - this.loadingBar.complete() + this.loadingBar.useRef().complete() this.isImportingVideo = false this.firstStepError.emit() this.notifier.error(err.message) diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts index 6508eef7e..da25663d7 100644 --- a/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts +++ b/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts @@ -71,7 +71,7 @@ export class VideoImportUrlComponent extends VideoSend implements OnInit, CanCom channelId: this.firstStepChannelId } - this.loadingBar.start() + this.loadingBar.useRef().start() this.videoImportService .importVideoUrl(this.targetUrl, videoUpdate) @@ -86,7 +86,7 @@ export class VideoImportUrlComponent extends VideoSend implements OnInit, CanCom ) .subscribe( ({ video, videoCaptions }) => { - this.loadingBar.complete() + this.loadingBar.useRef().complete() this.firstStepDone.emit(video.name) this.isImportingVideo = false this.hasImportedVideo = true @@ -115,7 +115,7 @@ export class VideoImportUrlComponent extends VideoSend implements OnInit, CanCom }, err => { - this.loadingBar.complete() + this.loadingBar.useRef().complete() this.isImportingVideo = false this.firstStepError.emit() this.notifier.error(err.message) diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-send.ts b/client/src/app/+videos/+video-edit/video-add-components/video-send.ts index 5d11ba7ce..2e658dfae 100644 --- a/client/src/app/+videos/+video-edit/video-add-components/video-send.ts +++ b/client/src/app/+videos/+video-edit/video-add-components/video-send.ts @@ -1,5 +1,5 @@ import { catchError, switchMap, tap } from 'rxjs/operators' -import { EventEmitter, OnInit, Directive } from '@angular/core' +import { Directive, EventEmitter, OnInit } from '@angular/core' import { AuthService, CanComponentDeactivateResult, Notifier, ServerService } from '@app/core' import { populateAsyncUserVideoChannels } from '@app/helpers' import { FormReactive } from '@app/shared/shared-forms' @@ -8,6 +8,7 @@ import { LoadingBarService } from '@ngx-loading-bar/core' import { ServerConfig, VideoConstant, VideoPrivacy } from '@shared/models' @Directive() +// tslint:disable-next-line: directive-class-suffix export abstract class VideoSend extends FormReactive implements OnInit { userVideoChannels: { id: number, label: string, support: string }[] = [] videoPrivacies: VideoConstant[] = [] @@ -56,15 +57,15 @@ export abstract class VideoSend extends FormReactive implements OnInit { } protected updateVideoAndCaptions (video: VideoEdit) { - this.loadingBar.start() + this.loadingBar.useRef().start() return this.videoService.updateVideo(video) .pipe( // Then update captions switchMap(() => this.videoCaptionService.updateCaptions(video.id, this.videoCaptions)), - tap(() => this.loadingBar.complete()), + tap(() => this.loadingBar.useRef().complete()), catchError(err => { - this.loadingBar.complete() + this.loadingBar.useRef().complete() throw err }) ) diff --git a/client/src/app/+videos/+video-edit/video-update.component.ts b/client/src/app/+videos/+video-edit/video-update.component.ts index 7bd6eb553..581199d65 100644 --- a/client/src/app/+videos/+video-edit/video-update.component.ts +++ b/client/src/app/+videos/+video-edit/video-update.component.ts @@ -101,7 +101,7 @@ export class VideoUpdateComponent extends FormReactive implements OnInit { this.video.patch(this.form.value) - this.loadingBar.start() + this.loadingBar.useRef().start() this.isUpdatingVideo = true // Update the video @@ -114,13 +114,13 @@ export class VideoUpdateComponent extends FormReactive implements OnInit { () => { this.updateDone = true this.isUpdatingVideo = false - this.loadingBar.complete() + this.loadingBar.useRef().complete() this.notifier.success(this.i18n('Video updated.')) this.router.navigate([ '/videos/watch', this.video.uuid ]) }, err => { - this.loadingBar.complete() + this.loadingBar.useRef().complete() this.isUpdatingVideo = false this.notifier.error(err.message) console.error(err) -- cgit v1.2.3