remove unused imports
authorBO41 <lukasw41@gmail.com>
Sat, 22 Sep 2018 18:11:16 +0000 (20:11 +0200)
committerBO41 <lukasw41@gmail.com>
Sat, 22 Sep 2018 18:11:16 +0000 (20:11 +0200)
26 files changed:
client/src/app/+accounts/account-about/account-about.component.ts
client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
client/src/app/+admin/config/shared/config.service.ts
client/src/app/+admin/follows/shared/redundancy-checkbox.component.ts
client/src/app/+admin/follows/shared/redundancy.service.ts
client/src/app/+admin/jobs/jobs-list/jobs-list.component.ts
client/src/app/+admin/users/user-list/user-list.component.ts
client/src/app/+my-account/my-account-settings/my-account-settings.component.ts
client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.ts
client/src/app/+my-account/shared/actor-avatar-info.component.ts
client/src/app/+video-channels/video-channel-about/video-channel-about.component.ts
client/src/app/core/confirm/confirm.component.ts
client/src/app/reset-password/reset-password.component.ts
client/src/app/search/search-filters.component.ts
client/src/app/shared/guards/can-deactivate-guard.service.ts
client/src/app/shared/overview/overview.service.ts
client/src/app/shared/rest/rest-extractor.service.ts
client/src/app/shared/user-subscription/subscribe-button.component.ts
client/src/app/shared/video-caption/video-caption.service.ts
client/src/app/signup/signup.component.ts
client/src/app/videos/+video-edit/video-update.component.ts
client/src/app/videos/+video-watch/modal/video-download.component.ts
client/src/app/videos/+video-watch/modal/video-share.component.ts
client/src/app/videos/+video-watch/modal/video-support.component.ts
client/src/app/videos/recommendations/recent-videos-recommendation.service.ts
client/src/assets/player/theater-button.ts

index 2acf67a59ae85909159fd0fb80e46afafea181c4..6f3e6caa0487b77812817f0c1ef5229bd351eff0 100644 (file)
@@ -1,5 +1,4 @@
 import { Component, OnInit, OnDestroy } from '@angular/core'
-import { ActivatedRoute } from '@angular/router'
 import { Account } from '@app/shared/account/account.model'
 import { AccountService } from '@app/shared/account/account.service'
 import { I18n } from '@ngx-translate/i18n-polyfill'
@@ -18,7 +17,6 @@ export class AccountAboutComponent implements OnInit, OnDestroy {
   private accountSub: Subscription
 
   constructor (
-    private route: ActivatedRoute,
     private i18n: I18n,
     private accountService: AccountService,
     private markdownService: MarkdownService
index ce2ea8a6c15b911591405ee74a63954cc423610b..9b3bd86f197a8558008f52c200a579783c411a9c 100644 (file)
@@ -1,5 +1,4 @@
 import { Component, OnInit } from '@angular/core'
-import { Router } from '@angular/router'
 import { ConfigService } from '@app/+admin/config/shared/config.service'
 import { ConfirmService } from '@app/core'
 import { ServerService } from '@app/core/server/server.service'
@@ -54,7 +53,6 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
     protected formValidatorService: FormValidatorService,
     private customConfigValidatorsService: CustomConfigValidatorsService,
     private userValidatorsService: UserValidatorsService,
-    private router: Router,
     private notificationsService: NotificationsService,
     private configService: ConfigService,
     private serverService: ServerService,
index 1565774b31e85ecc8e8a41e16771054152eaf2d8..7c61fe9e7fc7c7964a4ea1c06525ab09d1911b37 100644 (file)
@@ -3,7 +3,7 @@ import { HttpClient } from '@angular/common/http'
 import { Injectable } from '@angular/core'
 import { CustomConfig } from '../../../../../../shared/models/server/custom-config.model'
 import { environment } from '../../../../environments/environment'
-import { RestExtractor, RestService } from '../../../shared'
+import { RestExtractor } from '../../../shared'
 
 @Injectable()
 export class ConfigService {
@@ -11,7 +11,6 @@ export class ConfigService {
 
   constructor (
     private authHttp: HttpClient,
-    private restService: RestService,
     private restExtractor: RestExtractor
   ) {}
 
index ff4725e9152f5b75e13e0d61f46131f747210609..6d77a0eb4364f26eab40e5f6a00d50c3e001fd32 100644 (file)
@@ -1,7 +1,4 @@
 import { Component, Input } from '@angular/core'
-import { AuthService } from '@app/core'
-import { RestExtractor } from '@app/shared/rest'
-import { RedirectService } from '@app/core/routing/redirect.service'
 import { NotificationsService } from 'angular2-notifications'
 import { I18n } from '@ngx-translate/i18n-polyfill'
 import { RedundancyService } from '@app/+admin/follows/shared/redundancy.service'
@@ -16,9 +13,6 @@ export class RedundancyCheckboxComponent {
   @Input() host: string
 
   constructor (
-    private authService: AuthService,
-    private restExtractor: RestExtractor,
-    private redirectService: RedirectService,
     private notificationsService: NotificationsService,
     private redundancyService: RedundancyService,
     private i18n: I18n
index 96b29faab5a8998331195e98b8a0d03466c41e9e..87ae01c046a702f6f4937ddc13f760b37672f273 100644 (file)
@@ -1,7 +1,7 @@
 import { catchError, map } from 'rxjs/operators'
 import { HttpClient } from '@angular/common/http'
 import { Injectable } from '@angular/core'
-import { RestExtractor, RestService } from '@app/shared'
+import { RestExtractor } from '@app/shared'
 import { environment } from '../../../../environments/environment'
 
 @Injectable()
@@ -10,8 +10,7 @@ export class RedundancyService {
 
   constructor (
     private authHttp: HttpClient,
-    private restExtractor: RestExtractor,
-    private restService: RestService
+    private restExtractor: RestExtractor
   ) { }
 
   updateRedundancy (host: string, redundancyAllowed: boolean) {
index 44ab59d3637061fa5f57953cabe2d51c2c2a40cb..866ba1b234dd2aafa52cfbaca3f72d103911c172 100644 (file)
@@ -5,7 +5,6 @@ import { SortMeta } from 'primeng/primeng'
 import { Job } from '../../../../../../shared/index'
 import { JobState } from '../../../../../../shared/models'
 import { RestPagination, RestTable } from '../../../shared'
-import { RestExtractor } from '../../../shared/rest/rest-extractor.service'
 import { JobService } from '../shared'
 import { I18n } from '@ngx-translate/i18n-polyfill'
 
@@ -27,7 +26,6 @@ export class JobsListComponent extends RestTable implements OnInit {
 
   constructor (
     private notificationsService: NotificationsService,
-    private restExtractor: RestExtractor,
     private jobsService: JobService,
     private i18n: I18n
   ) {
index 9697ce202e4540e220334913f7509877cb0193c8..100ffc00e6eee3deb8993e472a057add73996537 100644 (file)
@@ -25,7 +25,6 @@ export class UserListComponent extends RestTable implements OnInit {
   pagination: RestPagination = { count: this.rowsPerPage, start: 0 }
   userActions: DropdownAction<User>[] = []
 
-  private userToBan: User
   private openedModal: NgbModalRef
 
   constructor (
@@ -63,7 +62,6 @@ export class UserListComponent extends RestTable implements OnInit {
   }
 
   hideBanUserModal () {
-    this.userToBan = undefined
     this.openedModal.close()
   }
 
index 164a46a4813ac276d4e9dc1fe4209178493d7bc3..62053d97b2003220cf0f7da19c3bfc3858c66001 100644 (file)
@@ -2,7 +2,6 @@ import { Component, OnInit, ViewChild } from '@angular/core'
 import { NotificationsService } from 'angular2-notifications'
 import { BytesPipe } from 'ngx-pipes'
 import { AuthService } from '../../core'
-import { ServerService } from '../../core/server'
 import { User } from '../../shared'
 import { UserService } from '../../shared/users'
 import { I18n } from '@ngx-translate/i18n-polyfill'
@@ -20,7 +19,6 @@ export class MyAccountSettingsComponent implements OnInit {
   constructor (
     private userService: UserService,
     private authService: AuthService,
-    private serverService: ServerService,
     private notificationsService: NotificationsService,
     private i18n: I18n
   ) {}
index 31ccb0bc843e50fc348ed43a9bd5381f98bb6346..d9fb20446067e087866d216f4a6232aac9d6eb95 100644 (file)
@@ -2,7 +2,6 @@ import { Component, OnInit } from '@angular/core'
 import { RestPagination, RestTable } from '@app/shared'
 import { SortMeta } from 'primeng/components/common/sortmeta'
 import { NotificationsService } from 'angular2-notifications'
-import { ConfirmService } from '@app/core'
 import { I18n } from '@ngx-translate/i18n-polyfill'
 import { VideoImport, VideoImportState } from '../../../../../shared/models/videos'
 import { VideoImportService } from '@app/shared/video-import'
@@ -21,7 +20,6 @@ export class MyAccountVideoImportsComponent extends RestTable implements OnInit
 
   constructor (
     private notificationsService: NotificationsService,
-    private confirmService: ConfirmService,
     private videoImportService: VideoImportService,
     private i18n: I18n
   ) {
index e0b25ad33394d7acdf72d70361b72ad23eff4810..7b80b1ed439368a14467fe9f927da99d6e4c0956 100644 (file)
@@ -1,7 +1,5 @@
 import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core'
-import { AuthService } from '../../core'
 import { ServerService } from '../../core/server'
-import { UserService } from '../../shared/users'
 import { NotificationsService } from 'angular2-notifications'
 import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
 import { Account } from '@app/shared/account/account.model'
@@ -19,8 +17,6 @@ export class ActorAvatarInfoComponent {
   @Output() avatarChange = new EventEmitter<FormData>()
 
   constructor (
-    private userService: UserService,
-    private authService: AuthService,
     private serverService: ServerService,
     private notificationsService: NotificationsService
   ) {}
index 901c91de9560df9b1d3e162c454a7bce495cc6f1..ea7b0e118875f41b2945aeacfd4f37fdd98c91b2 100644 (file)
@@ -1,5 +1,4 @@
 import { Component, OnDestroy, OnInit } from '@angular/core'
-import { ActivatedRoute } from '@angular/router'
 import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
 import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
 import { I18n } from '@ngx-translate/i18n-polyfill'
@@ -19,7 +18,6 @@ export class VideoChannelAboutComponent implements OnInit, OnDestroy {
   private videoChannelSub: Subscription
 
   constructor (
-    private route: ActivatedRoute,
     private i18n: I18n,
     private videoChannelService: VideoChannelService,
     private markdownService: MarkdownService
index 0d18c38e85870c1ee460100de7d3a57f2532838d..5138b78483e4a204971bc22a243fec3425d8ebe8 100644 (file)
@@ -26,9 +26,7 @@ export class ConfirmComponent implements OnInit {
     private modalService: NgbModal,
     private confirmService: ConfirmService,
     private i18n: I18n
-  ) {
-    // Empty
-  }
+  ) { }
 
   ngOnInit () {
     this.confirmService.showConfirm.subscribe(
index cb4a634f13701dea6cdd635c139cb18ada5a359d..af1298de613d225d00bf50212e57ec3fd0fdc3ae 100644 (file)
@@ -2,7 +2,6 @@ import { Component, OnInit } from '@angular/core'
 import { ActivatedRoute, Router } from '@angular/router'
 import { UserService, UserValidatorsService } from '@app/shared'
 import { NotificationsService } from 'angular2-notifications'
-import { AuthService } from '../core'
 import { FormReactive } from '../shared'
 import { I18n } from '@ngx-translate/i18n-polyfill'
 import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
@@ -22,7 +21,6 @@ export class ResetPasswordComponent extends FormReactive implements OnInit {
     protected formValidatorService: FormValidatorService,
     private resetPasswordValidatorsService: ResetPasswordValidatorsService,
     private userValidatorsService: UserValidatorsService,
-    private authService: AuthService,
     private userService: UserService,
     private notificationsService: NotificationsService,
     private router: Router,
index f2f001e3fea46368bf84d283f7c2a8e7b656a827..8d7f84ac1ba5758b5294ddd2a995c45d5fe7fc0d 100644 (file)
@@ -31,11 +31,6 @@ export class SearchFiltersComponent implements OnInit {
 
   constructor (
     private i18n: I18n,
-    private route: ActivatedRoute,
-    private metaService: MetaService,
-    private redirectService: RedirectService,
-    private notificationsService: NotificationsService,
-    private searchService: SearchService,
     private serverService: ServerService
   ) {
     this.publishedDateRanges = [
index c038a5c0edae4dd81ead969cd6c361d534575605..e2a79e8c4e9d3a2e9a4e745d180cbf1c30e4874c 100644 (file)
@@ -1,5 +1,5 @@
 import { Injectable } from '@angular/core'
-import { ActivatedRouteSnapshot, CanDeactivate, RouterStateSnapshot } from '@angular/router'
+import { CanDeactivate } from '@angular/router'
 import { Observable } from 'rxjs'
 import { ConfirmService } from '../../core/index'
 import { I18n } from '@ngx-translate/i18n-polyfill'
@@ -15,11 +15,7 @@ export class CanDeactivateGuard implements CanDeactivate<CanComponentDeactivate>
     private i18n: I18n
   ) { }
 
-  canDeactivate (component: CanComponentDeactivate,
-    currentRoute: ActivatedRouteSnapshot,
-    currentState: RouterStateSnapshot,
-    nextState: RouterStateSnapshot
-  ) {
+  canDeactivate (component: CanComponentDeactivate) {
     const result = component.canDeactivate()
     const text = result.text || this.i18n('All unsaved data will be lost, are you sure you want to leave this page?')
 
index 097079e6d73a88e21cd3d6874b3c39e086c964ec..98dba2d9767cccb843cf964026f3d50300b2d0d9 100644 (file)
@@ -5,7 +5,6 @@ import { forkJoin, Observable, of } from 'rxjs'
 import { VideosOverview as VideosOverviewServer, peertubeTranslate } from '../../../../../shared/models'
 import { environment } from '../../../environments/environment'
 import { RestExtractor } from '../rest/rest-extractor.service'
-import { RestService } from '../rest/rest.service'
 import { VideosOverview } from '@app/shared/overview/videos-overview.model'
 import { VideoService } from '@app/shared/video/video.service'
 import { ServerService } from '@app/core'
@@ -18,7 +17,6 @@ export class OverviewService {
   constructor (
     private authHttp: HttpClient,
     private restExtractor: RestExtractor,
-    private restService: RestService,
     private videosService: VideoService,
     private serverService: ServerService
   ) {}
index 0d5b6d6f3fa1c25e5837f137b22b00969c20a411..6492aa66de554a6af5f621c5c520d27639664ba4 100644 (file)
@@ -11,9 +11,7 @@ export class RestExtractor {
   constructor (
     private router: Router,
     private i18n: I18n
-  ) {
-    // empty
-  }
+  ) { }
 
   extractDataBool () {
     return true
index ba7acf69adf7ef9c0086cc4c8790444dd1709823..b5873a2eec4d507d6a451d578741b117f298e3f0 100644 (file)
@@ -1,7 +1,4 @@
 import { Component, Input, OnInit } from '@angular/core'
-import { AuthService } from '@app/core'
-import { RestExtractor } from '@app/shared/rest'
-import { RedirectService } from '@app/core/routing/redirect.service'
 import { UserSubscriptionService } from '@app/shared/user-subscription/user-subscription.service'
 import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
 import { NotificationsService } from 'angular2-notifications'
@@ -20,9 +17,6 @@ export class SubscribeButtonComponent implements OnInit {
   subscribed: boolean
 
   constructor (
-    private authService: AuthService,
-    private restExtractor: RestExtractor,
-    private redirectService: RedirectService,
     private notificationsService: NotificationsService,
     private userSubscriptionService: UserSubscriptionService,
     private i18n: I18n
index 08fd61265964ab5cda7d4e4823e81a0fd0d4866f..a1838ab16219a0311afcac253ffeee6d3977bee6 100644 (file)
@@ -3,7 +3,7 @@ import { HttpClient } from '@angular/common/http'
 import { Injectable } from '@angular/core'
 import { forkJoin, Observable, of } from 'rxjs'
 import { peertubeTranslate, ResultList } from '../../../../../shared'
-import { RestExtractor, RestService } from '../rest'
+import { RestExtractor } from '../rest'
 import { VideoService } from '@app/shared/video/video.service'
 import { objectToFormData, sortBy } from '@app/shared/misc/utils'
 import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model'
@@ -15,7 +15,6 @@ export class VideoCaptionService {
   constructor (
     private authHttp: HttpClient,
     private serverService: ServerService,
-    private restService: RestService,
     private restExtractor: RestExtractor
   ) {}
 
index 16e4446785fbe742412ac11500db52ec3ffc0134..cf2657b85d382ab61e1b24f798b6e12aac159238 100644 (file)
@@ -1,5 +1,4 @@
 import { Component, OnInit } from '@angular/core'
-import { Router } from '@angular/router'
 import { NotificationsService } from 'angular2-notifications'
 import { UserCreate } from '../../../../shared'
 import { FormReactive, UserService, UserValidatorsService } from '../shared'
@@ -18,7 +17,6 @@ export class SignupComponent extends FormReactive implements OnInit {
   constructor (
     protected formValidatorService: FormValidatorService,
     private userValidatorsService: UserValidatorsService,
-    private router: Router,
     private notificationsService: NotificationsService,
     private userService: UserService,
     private serverService: ServerService,
index 75b11f46c7bd02c9430eb9538a66ded6eada4cb3..856e61530f7582c3e2cfe9e98c1c5451a96a94bf 100644 (file)
@@ -5,11 +5,9 @@ import { LoadingBarService } from '@ngx-loading-bar/core'
 import { NotificationsService } from 'angular2-notifications'
 import { VideoConstant, VideoPrivacy } from '../../../../../shared/models/videos'
 import { ServerService } from '../../core'
-import { AuthService } from '../../core/auth'
 import { FormReactive } from '../../shared'
 import { VideoEdit } from '../../shared/video/video-edit.model'
 import { VideoService } from '../../shared/video/video.service'
-import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
 import { I18n } from '@ngx-translate/i18n-polyfill'
 import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
 import { VideoCaptionService } from '@app/shared/video-caption'
@@ -38,9 +36,7 @@ export class VideoUpdateComponent extends FormReactive implements OnInit {
     private notificationsService: NotificationsService,
     private serverService: ServerService,
     private videoService: VideoService,
-    private authService: AuthService,
     private loadingBar: LoadingBarService,
-    private videoChannelService: VideoChannelService,
     private videoCaptionService: VideoCaptionService,
     private i18n: I18n
   ) {
index 1361146dd774521d2aa839a8334178b5b1e9a595..f4d9003ee74db62ec99d6008624b473aacfcabaa 100644 (file)
@@ -15,9 +15,7 @@ export class VideoDownloadComponent implements OnInit {
   downloadType: 'direct' | 'torrent' | 'magnet' = 'torrent'
   resolutionId: number | string = -1
 
-  constructor (private modalService: NgbModal) {
-    // empty
-  }
+  constructor (private modalService: NgbModal) { }
 
   ngOnInit () {
     this.resolutionId = this.video.files[0].resolution.id
index 71d6f5633054d131cf24058a20767f28172e8898..17e2b31e1bb8e4b3c974fc064ee4e22162aa39f9 100644 (file)
@@ -25,9 +25,7 @@ export class VideoShareComponent {
     private modalService: NgbModal,
     private notificationsService: NotificationsService,
     private i18n: I18n
-  ) {
-    // empty
-  }
+  ) { }
 
   show (currentVideoTimestamp?: number) {
     this.currentVideoTimestamp = Math.floor(currentVideoTimestamp)
index 2d400e0be342bfb02c644ec376677f8b77ae90a2..1540021209b5404e413991315259b08e1a8461e8 100644 (file)
@@ -19,9 +19,7 @@ export class VideoSupportComponent {
   constructor (
     private markdownService: MarkdownService,
     private modalService: NgbModal
-  ) {
-    // empty
-  }
+  ) { }
 
   show () {
     this.videoHTMLSupport = this.markdownService.enhancedMarkdownToHTML(this.video.support)
index 0ee34b9cb28a5d254f6c37e68be582bcee2c557c..59acf17bcc99c5620427a5610eccf2692fd4ff8d 100644 (file)
@@ -1,4 +1,4 @@
-import { Inject, Injectable } from '@angular/core'
+import { Injectable } from '@angular/core'
 import { RecommendationService } from '@app/videos/recommendations/recommendations.service'
 import { Video } from '@app/shared/video/video.model'
 import { RecommendationInfo } from '@app/shared/video/recommendation-info.model'
@@ -19,8 +19,7 @@ export class RecentVideosRecommendationService implements RecommendationService
   constructor (
     private videos: VideoService,
     private searchService: SearchService
-  ) {
-  }
+  ) { }
 
   getRecommendations (recommendation: RecommendationInfo): Observable<Video[]> {
     return this.fetchPage(1, recommendation)
index bad737edadd5c3071011af8f5a2d8cfe71332098..5cf0b64255063ee0e101bf7529b2ad47a91ce6f7 100644 (file)
@@ -1,6 +1,5 @@
 import { VideoJSComponentInterface, videojsUntyped } from './peertube-videojs-typings'
-import { saveTheaterInStore } from './peertube-player-local-storage'
-import { getStoredTheater } from './peertube-player-local-storage'
+import { saveTheaterInStore, getStoredTheater } from './peertube-player-local-storage'
 
 const Button: VideoJSComponentInterface = videojsUntyped.getComponent('Button')
 class TheaterButton extends Button {