Merge pull request #1105 from BO41/unused-imports

remove unused imports
This commit is contained in:
Chocobozzz 2018-09-24 10:40:38 +02:00 committed by GitHub
commit 6937f26a5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 13 additions and 75 deletions

View File

@ -1,5 +1,4 @@
import { Component, OnInit, OnDestroy } from '@angular/core' import { Component, OnInit, OnDestroy } from '@angular/core'
import { ActivatedRoute } from '@angular/router'
import { Account } from '@app/shared/account/account.model' import { Account } from '@app/shared/account/account.model'
import { AccountService } from '@app/shared/account/account.service' import { AccountService } from '@app/shared/account/account.service'
import { I18n } from '@ngx-translate/i18n-polyfill' import { I18n } from '@ngx-translate/i18n-polyfill'
@ -18,7 +17,6 @@ export class AccountAboutComponent implements OnInit, OnDestroy {
private accountSub: Subscription private accountSub: Subscription
constructor ( constructor (
private route: ActivatedRoute,
private i18n: I18n, private i18n: I18n,
private accountService: AccountService, private accountService: AccountService,
private markdownService: MarkdownService private markdownService: MarkdownService

View File

@ -1,5 +1,4 @@
import { Component, OnInit } from '@angular/core' import { Component, OnInit } from '@angular/core'
import { Router } from '@angular/router'
import { ConfigService } from '@app/+admin/config/shared/config.service' import { ConfigService } from '@app/+admin/config/shared/config.service'
import { ConfirmService } from '@app/core' import { ConfirmService } from '@app/core'
import { ServerService } from '@app/core/server/server.service' import { ServerService } from '@app/core/server/server.service'
@ -54,7 +53,6 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
protected formValidatorService: FormValidatorService, protected formValidatorService: FormValidatorService,
private customConfigValidatorsService: CustomConfigValidatorsService, private customConfigValidatorsService: CustomConfigValidatorsService,
private userValidatorsService: UserValidatorsService, private userValidatorsService: UserValidatorsService,
private router: Router,
private notificationsService: NotificationsService, private notificationsService: NotificationsService,
private configService: ConfigService, private configService: ConfigService,
private serverService: ServerService, private serverService: ServerService,

View File

@ -3,7 +3,7 @@ import { HttpClient } from '@angular/common/http'
import { Injectable } from '@angular/core' import { Injectable } from '@angular/core'
import { CustomConfig } from '../../../../../../shared/models/server/custom-config.model' import { CustomConfig } from '../../../../../../shared/models/server/custom-config.model'
import { environment } from '../../../../environments/environment' import { environment } from '../../../../environments/environment'
import { RestExtractor, RestService } from '../../../shared' import { RestExtractor } from '../../../shared'
@Injectable() @Injectable()
export class ConfigService { export class ConfigService {
@ -11,7 +11,6 @@ export class ConfigService {
constructor ( constructor (
private authHttp: HttpClient, private authHttp: HttpClient,
private restService: RestService,
private restExtractor: RestExtractor private restExtractor: RestExtractor
) {} ) {}

View File

@ -1,7 +1,4 @@
import { Component, Input } from '@angular/core' 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 { NotificationsService } from 'angular2-notifications'
import { I18n } from '@ngx-translate/i18n-polyfill' import { I18n } from '@ngx-translate/i18n-polyfill'
import { RedundancyService } from '@app/+admin/follows/shared/redundancy.service' import { RedundancyService } from '@app/+admin/follows/shared/redundancy.service'
@ -16,9 +13,6 @@ export class RedundancyCheckboxComponent {
@Input() host: string @Input() host: string
constructor ( constructor (
private authService: AuthService,
private restExtractor: RestExtractor,
private redirectService: RedirectService,
private notificationsService: NotificationsService, private notificationsService: NotificationsService,
private redundancyService: RedundancyService, private redundancyService: RedundancyService,
private i18n: I18n private i18n: I18n

View File

@ -1,7 +1,7 @@
import { catchError, map } from 'rxjs/operators' import { catchError, map } from 'rxjs/operators'
import { HttpClient } from '@angular/common/http' import { HttpClient } from '@angular/common/http'
import { Injectable } from '@angular/core' import { Injectable } from '@angular/core'
import { RestExtractor, RestService } from '@app/shared' import { RestExtractor } from '@app/shared'
import { environment } from '../../../../environments/environment' import { environment } from '../../../../environments/environment'
@Injectable() @Injectable()
@ -10,8 +10,7 @@ export class RedundancyService {
constructor ( constructor (
private authHttp: HttpClient, private authHttp: HttpClient,
private restExtractor: RestExtractor, private restExtractor: RestExtractor
private restService: RestService
) { } ) { }
updateRedundancy (host: string, redundancyAllowed: boolean) { updateRedundancy (host: string, redundancyAllowed: boolean) {

View File

@ -5,7 +5,6 @@ import { SortMeta } from 'primeng/primeng'
import { Job } from '../../../../../../shared/index' import { Job } from '../../../../../../shared/index'
import { JobState } from '../../../../../../shared/models' import { JobState } from '../../../../../../shared/models'
import { RestPagination, RestTable } from '../../../shared' import { RestPagination, RestTable } from '../../../shared'
import { RestExtractor } from '../../../shared/rest/rest-extractor.service'
import { JobService } from '../shared' import { JobService } from '../shared'
import { I18n } from '@ngx-translate/i18n-polyfill' import { I18n } from '@ngx-translate/i18n-polyfill'
@ -27,7 +26,6 @@ export class JobsListComponent extends RestTable implements OnInit {
constructor ( constructor (
private notificationsService: NotificationsService, private notificationsService: NotificationsService,
private restExtractor: RestExtractor,
private jobsService: JobService, private jobsService: JobService,
private i18n: I18n private i18n: I18n
) { ) {

View File

@ -25,7 +25,6 @@ export class UserListComponent extends RestTable implements OnInit {
pagination: RestPagination = { count: this.rowsPerPage, start: 0 } pagination: RestPagination = { count: this.rowsPerPage, start: 0 }
userActions: DropdownAction<User>[] = [] userActions: DropdownAction<User>[] = []
private userToBan: User
private openedModal: NgbModalRef private openedModal: NgbModalRef
constructor ( constructor (
@ -63,7 +62,6 @@ export class UserListComponent extends RestTable implements OnInit {
} }
hideBanUserModal () { hideBanUserModal () {
this.userToBan = undefined
this.openedModal.close() this.openedModal.close()
} }

View File

@ -2,7 +2,6 @@ import { Component, OnInit, ViewChild } from '@angular/core'
import { NotificationsService } from 'angular2-notifications' import { NotificationsService } from 'angular2-notifications'
import { BytesPipe } from 'ngx-pipes' import { BytesPipe } from 'ngx-pipes'
import { AuthService } from '../../core' import { AuthService } from '../../core'
import { ServerService } from '../../core/server'
import { User } from '../../shared' import { User } from '../../shared'
import { UserService } from '../../shared/users' import { UserService } from '../../shared/users'
import { I18n } from '@ngx-translate/i18n-polyfill' import { I18n } from '@ngx-translate/i18n-polyfill'
@ -20,7 +19,6 @@ export class MyAccountSettingsComponent implements OnInit {
constructor ( constructor (
private userService: UserService, private userService: UserService,
private authService: AuthService, private authService: AuthService,
private serverService: ServerService,
private notificationsService: NotificationsService, private notificationsService: NotificationsService,
private i18n: I18n private i18n: I18n
) {} ) {}

View File

@ -2,7 +2,6 @@ import { Component, OnInit } from '@angular/core'
import { RestPagination, RestTable } from '@app/shared' import { RestPagination, RestTable } from '@app/shared'
import { SortMeta } from 'primeng/components/common/sortmeta' import { SortMeta } from 'primeng/components/common/sortmeta'
import { NotificationsService } from 'angular2-notifications' import { NotificationsService } from 'angular2-notifications'
import { ConfirmService } from '@app/core'
import { I18n } from '@ngx-translate/i18n-polyfill' import { I18n } from '@ngx-translate/i18n-polyfill'
import { VideoImport, VideoImportState } from '../../../../../shared/models/videos' import { VideoImport, VideoImportState } from '../../../../../shared/models/videos'
import { VideoImportService } from '@app/shared/video-import' import { VideoImportService } from '@app/shared/video-import'
@ -21,7 +20,6 @@ export class MyAccountVideoImportsComponent extends RestTable implements OnInit
constructor ( constructor (
private notificationsService: NotificationsService, private notificationsService: NotificationsService,
private confirmService: ConfirmService,
private videoImportService: VideoImportService, private videoImportService: VideoImportService,
private i18n: I18n private i18n: I18n
) { ) {

View File

@ -1,7 +1,5 @@
import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core' import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core'
import { AuthService } from '../../core'
import { ServerService } from '../../core/server' import { ServerService } from '../../core/server'
import { UserService } from '../../shared/users'
import { NotificationsService } from 'angular2-notifications' import { NotificationsService } from 'angular2-notifications'
import { VideoChannel } from '@app/shared/video-channel/video-channel.model' import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
import { Account } from '@app/shared/account/account.model' import { Account } from '@app/shared/account/account.model'
@ -19,8 +17,6 @@ export class ActorAvatarInfoComponent {
@Output() avatarChange = new EventEmitter<FormData>() @Output() avatarChange = new EventEmitter<FormData>()
constructor ( constructor (
private userService: UserService,
private authService: AuthService,
private serverService: ServerService, private serverService: ServerService,
private notificationsService: NotificationsService private notificationsService: NotificationsService
) {} ) {}

View File

@ -1,5 +1,4 @@
import { Component, OnDestroy, OnInit } from '@angular/core' import { Component, OnDestroy, OnInit } from '@angular/core'
import { ActivatedRoute } from '@angular/router'
import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
import { VideoChannel } from '@app/shared/video-channel/video-channel.model' import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
import { I18n } from '@ngx-translate/i18n-polyfill' import { I18n } from '@ngx-translate/i18n-polyfill'
@ -19,7 +18,6 @@ export class VideoChannelAboutComponent implements OnInit, OnDestroy {
private videoChannelSub: Subscription private videoChannelSub: Subscription
constructor ( constructor (
private route: ActivatedRoute,
private i18n: I18n, private i18n: I18n,
private videoChannelService: VideoChannelService, private videoChannelService: VideoChannelService,
private markdownService: MarkdownService private markdownService: MarkdownService

View File

@ -26,9 +26,7 @@ export class ConfirmComponent implements OnInit {
private modalService: NgbModal, private modalService: NgbModal,
private confirmService: ConfirmService, private confirmService: ConfirmService,
private i18n: I18n private i18n: I18n
) { ) { }
// Empty
}
ngOnInit () { ngOnInit () {
this.confirmService.showConfirm.subscribe( this.confirmService.showConfirm.subscribe(

View File

@ -2,7 +2,6 @@ import { Component, OnInit } from '@angular/core'
import { ActivatedRoute, Router } from '@angular/router' import { ActivatedRoute, Router } from '@angular/router'
import { UserService, UserValidatorsService } from '@app/shared' import { UserService, UserValidatorsService } from '@app/shared'
import { NotificationsService } from 'angular2-notifications' import { NotificationsService } from 'angular2-notifications'
import { AuthService } from '../core'
import { FormReactive } from '../shared' import { FormReactive } from '../shared'
import { I18n } from '@ngx-translate/i18n-polyfill' import { I18n } from '@ngx-translate/i18n-polyfill'
import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' 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, protected formValidatorService: FormValidatorService,
private resetPasswordValidatorsService: ResetPasswordValidatorsService, private resetPasswordValidatorsService: ResetPasswordValidatorsService,
private userValidatorsService: UserValidatorsService, private userValidatorsService: UserValidatorsService,
private authService: AuthService,
private userService: UserService, private userService: UserService,
private notificationsService: NotificationsService, private notificationsService: NotificationsService,
private router: Router, private router: Router,

View File

@ -31,11 +31,6 @@ export class SearchFiltersComponent implements OnInit {
constructor ( constructor (
private i18n: I18n, private i18n: I18n,
private route: ActivatedRoute,
private metaService: MetaService,
private redirectService: RedirectService,
private notificationsService: NotificationsService,
private searchService: SearchService,
private serverService: ServerService private serverService: ServerService
) { ) {
this.publishedDateRanges = [ this.publishedDateRanges = [

View File

@ -1,5 +1,5 @@
import { Injectable } from '@angular/core' import { Injectable } from '@angular/core'
import { ActivatedRouteSnapshot, CanDeactivate, RouterStateSnapshot } from '@angular/router' import { CanDeactivate } from '@angular/router'
import { Observable } from 'rxjs' import { Observable } from 'rxjs'
import { ConfirmService } from '../../core/index' import { ConfirmService } from '../../core/index'
import { I18n } from '@ngx-translate/i18n-polyfill' import { I18n } from '@ngx-translate/i18n-polyfill'
@ -15,11 +15,7 @@ export class CanDeactivateGuard implements CanDeactivate<CanComponentDeactivate>
private i18n: I18n private i18n: I18n
) { } ) { }
canDeactivate (component: CanComponentDeactivate, canDeactivate (component: CanComponentDeactivate) {
currentRoute: ActivatedRouteSnapshot,
currentState: RouterStateSnapshot,
nextState: RouterStateSnapshot
) {
const result = component.canDeactivate() 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?') 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 { VideosOverview as VideosOverviewServer, peertubeTranslate } from '../../../../../shared/models'
import { environment } from '../../../environments/environment' import { environment } from '../../../environments/environment'
import { RestExtractor } from '../rest/rest-extractor.service' import { RestExtractor } from '../rest/rest-extractor.service'
import { RestService } from '../rest/rest.service'
import { VideosOverview } from '@app/shared/overview/videos-overview.model' import { VideosOverview } from '@app/shared/overview/videos-overview.model'
import { VideoService } from '@app/shared/video/video.service' import { VideoService } from '@app/shared/video/video.service'
import { ServerService } from '@app/core' import { ServerService } from '@app/core'
@ -18,7 +17,6 @@ export class OverviewService {
constructor ( constructor (
private authHttp: HttpClient, private authHttp: HttpClient,
private restExtractor: RestExtractor, private restExtractor: RestExtractor,
private restService: RestService,
private videosService: VideoService, private videosService: VideoService,
private serverService: ServerService private serverService: ServerService
) {} ) {}

View File

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

View File

@ -1,7 +1,4 @@
import { Component, Input, OnInit } from '@angular/core' 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 { UserSubscriptionService } from '@app/shared/user-subscription/user-subscription.service'
import { VideoChannel } from '@app/shared/video-channel/video-channel.model' import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
import { NotificationsService } from 'angular2-notifications' import { NotificationsService } from 'angular2-notifications'
@ -20,9 +17,6 @@ export class SubscribeButtonComponent implements OnInit {
subscribed: boolean subscribed: boolean
constructor ( constructor (
private authService: AuthService,
private restExtractor: RestExtractor,
private redirectService: RedirectService,
private notificationsService: NotificationsService, private notificationsService: NotificationsService,
private userSubscriptionService: UserSubscriptionService, private userSubscriptionService: UserSubscriptionService,
private i18n: I18n private i18n: I18n

View File

@ -3,7 +3,7 @@ import { HttpClient } from '@angular/common/http'
import { Injectable } from '@angular/core' import { Injectable } from '@angular/core'
import { forkJoin, Observable, of } from 'rxjs' import { forkJoin, Observable, of } from 'rxjs'
import { peertubeTranslate, ResultList } from '../../../../../shared' import { peertubeTranslate, ResultList } from '../../../../../shared'
import { RestExtractor, RestService } from '../rest' import { RestExtractor } from '../rest'
import { VideoService } from '@app/shared/video/video.service' import { VideoService } from '@app/shared/video/video.service'
import { objectToFormData, sortBy } from '@app/shared/misc/utils' import { objectToFormData, sortBy } from '@app/shared/misc/utils'
import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model' import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model'
@ -15,7 +15,6 @@ export class VideoCaptionService {
constructor ( constructor (
private authHttp: HttpClient, private authHttp: HttpClient,
private serverService: ServerService, private serverService: ServerService,
private restService: RestService,
private restExtractor: RestExtractor private restExtractor: RestExtractor
) {} ) {}

View File

@ -1,5 +1,4 @@
import { Component, OnInit } from '@angular/core' import { Component, OnInit } from '@angular/core'
import { Router } from '@angular/router'
import { NotificationsService } from 'angular2-notifications' import { NotificationsService } from 'angular2-notifications'
import { UserCreate } from '../../../../shared' import { UserCreate } from '../../../../shared'
import { FormReactive, UserService, UserValidatorsService } from '../shared' import { FormReactive, UserService, UserValidatorsService } from '../shared'
@ -18,7 +17,6 @@ export class SignupComponent extends FormReactive implements OnInit {
constructor ( constructor (
protected formValidatorService: FormValidatorService, protected formValidatorService: FormValidatorService,
private userValidatorsService: UserValidatorsService, private userValidatorsService: UserValidatorsService,
private router: Router,
private notificationsService: NotificationsService, private notificationsService: NotificationsService,
private userService: UserService, private userService: UserService,
private serverService: ServerService, private serverService: ServerService,

View File

@ -5,11 +5,9 @@ import { LoadingBarService } from '@ngx-loading-bar/core'
import { NotificationsService } from 'angular2-notifications' import { NotificationsService } from 'angular2-notifications'
import { VideoConstant, VideoPrivacy } from '../../../../../shared/models/videos' import { VideoConstant, VideoPrivacy } from '../../../../../shared/models/videos'
import { ServerService } from '../../core' import { ServerService } from '../../core'
import { AuthService } from '../../core/auth'
import { FormReactive } from '../../shared' import { FormReactive } from '../../shared'
import { VideoEdit } from '../../shared/video/video-edit.model' import { VideoEdit } from '../../shared/video/video-edit.model'
import { VideoService } from '../../shared/video/video.service' 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 { I18n } from '@ngx-translate/i18n-polyfill'
import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
import { VideoCaptionService } from '@app/shared/video-caption' import { VideoCaptionService } from '@app/shared/video-caption'
@ -38,9 +36,7 @@ export class VideoUpdateComponent extends FormReactive implements OnInit {
private notificationsService: NotificationsService, private notificationsService: NotificationsService,
private serverService: ServerService, private serverService: ServerService,
private videoService: VideoService, private videoService: VideoService,
private authService: AuthService,
private loadingBar: LoadingBarService, private loadingBar: LoadingBarService,
private videoChannelService: VideoChannelService,
private videoCaptionService: VideoCaptionService, private videoCaptionService: VideoCaptionService,
private i18n: I18n private i18n: I18n
) { ) {

View File

@ -25,9 +25,7 @@ export class VideoShareComponent {
private modalService: NgbModal, private modalService: NgbModal,
private notificationsService: NotificationsService, private notificationsService: NotificationsService,
private i18n: I18n private i18n: I18n
) { ) { }
// empty
}
show (currentVideoTimestamp?: number) { show (currentVideoTimestamp?: number) {
this.currentVideoTimestamp = Math.floor(currentVideoTimestamp) this.currentVideoTimestamp = Math.floor(currentVideoTimestamp)

View File

@ -19,9 +19,7 @@ export class VideoSupportComponent {
constructor ( constructor (
private markdownService: MarkdownService, private markdownService: MarkdownService,
private modalService: NgbModal private modalService: NgbModal
) { ) { }
// empty
}
show () { show () {
this.videoHTMLSupport = this.markdownService.enhancedMarkdownToHTML(this.video.support) 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 { RecommendationService } from '@app/videos/recommendations/recommendations.service'
import { Video } from '@app/shared/video/video.model' import { Video } from '@app/shared/video/video.model'
import { RecommendationInfo } from '@app/shared/video/recommendation-info.model' import { RecommendationInfo } from '@app/shared/video/recommendation-info.model'
@ -19,8 +19,7 @@ export class RecentVideosRecommendationService implements RecommendationService
constructor ( constructor (
private videos: VideoService, private videos: VideoService,
private searchService: SearchService private searchService: SearchService
) { ) { }
}
getRecommendations (recommendation: RecommendationInfo): Observable<Video[]> { getRecommendations (recommendation: RecommendationInfo): Observable<Video[]> {
return this.fetchPage(1, recommendation) return this.fetchPage(1, recommendation)

View File

@ -1,6 +1,5 @@
import { VideoJSComponentInterface, videojsUntyped } from './peertube-videojs-typings' import { VideoJSComponentInterface, videojsUntyped } from './peertube-videojs-typings'
import { saveTheaterInStore } from './peertube-player-local-storage' import { saveTheaterInStore, getStoredTheater } from './peertube-player-local-storage'
import { getStoredTheater } from './peertube-player-local-storage'
const Button: VideoJSComponentInterface = videojsUntyped.getComponent('Button') const Button: VideoJSComponentInterface = videojsUntyped.getComponent('Button')
class TheaterButton extends Button { class TheaterButton extends Button {