remove unused imports

pull/1105/head
BO41 2018-09-22 20:11:16 +02:00
parent 9fe4406794
commit 23db998f07
26 changed files with 14 additions and 78 deletions

View 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

View 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,

View 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
) {}

View 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

View 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) {

View 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
) {

View 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()
}

View 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
) {}

View 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
) {

View 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
) {}

View 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

View 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(

View 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,

View 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 = [

View 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?')

View 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
) {}

View File

@ -11,9 +11,7 @@ export class RestExtractor {
constructor (
private router: Router,
private i18n: I18n
) {
// empty
}
) { }
extractDataBool () {
return true

View 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

View 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
) {}

View 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,

View 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
) {

View 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

View 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)

View 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)

View 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)

View 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 {