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'
private accountSub: Subscription
constructor (
- private route: ActivatedRoute,
private i18n: I18n,
private accountService: AccountService,
private markdownService: MarkdownService
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'
protected formValidatorService: FormValidatorService,
private customConfigValidatorsService: CustomConfigValidatorsService,
private userValidatorsService: UserValidatorsService,
- private router: Router,
private notificationsService: NotificationsService,
private configService: ConfigService,
private serverService: ServerService,
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 {
constructor (
private authHttp: HttpClient,
- private restService: RestService,
private restExtractor: RestExtractor
) {}
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'
@Input() host: string
constructor (
- private authService: AuthService,
- private restExtractor: RestExtractor,
- private redirectService: RedirectService,
private notificationsService: NotificationsService,
private redundancyService: RedundancyService,
private i18n: I18n
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()
constructor (
private authHttp: HttpClient,
- private restExtractor: RestExtractor,
- private restService: RestService
+ private restExtractor: RestExtractor
) { }
updateRedundancy (host: string, redundancyAllowed: boolean) {
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'
constructor (
private notificationsService: NotificationsService,
- private restExtractor: RestExtractor,
private jobsService: JobService,
private i18n: I18n
) {
pagination: RestPagination = { count: this.rowsPerPage, start: 0 }
userActions: DropdownAction<User>[] = []
- private userToBan: User
private openedModal: NgbModalRef
constructor (
}
hideBanUserModal () {
- this.userToBan = undefined
this.openedModal.close()
}
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'
constructor (
private userService: UserService,
private authService: AuthService,
- private serverService: ServerService,
private notificationsService: NotificationsService,
private i18n: I18n
) {}
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'
constructor (
private notificationsService: NotificationsService,
- private confirmService: ConfirmService,
private videoImportService: VideoImportService,
private i18n: I18n
) {
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'
@Output() avatarChange = new EventEmitter<FormData>()
constructor (
- private userService: UserService,
- private authService: AuthService,
private serverService: ServerService,
private notificationsService: NotificationsService
) {}
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'
private videoChannelSub: Subscription
constructor (
- private route: ActivatedRoute,
private i18n: I18n,
private videoChannelService: VideoChannelService,
private markdownService: MarkdownService
private modalService: NgbModal,
private confirmService: ConfirmService,
private i18n: I18n
- ) {
- // Empty
- }
+ ) { }
ngOnInit () {
this.confirmService.showConfirm.subscribe(
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'
protected formValidatorService: FormValidatorService,
private resetPasswordValidatorsService: ResetPasswordValidatorsService,
private userValidatorsService: UserValidatorsService,
- private authService: AuthService,
private userService: UserService,
private notificationsService: NotificationsService,
private router: Router,
constructor (
private i18n: I18n,
- private route: ActivatedRoute,
- private metaService: MetaService,
- private redirectService: RedirectService,
- private notificationsService: NotificationsService,
- private searchService: SearchService,
private serverService: ServerService
) {
this.publishedDateRanges = [
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'
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?')
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'
constructor (
private authHttp: HttpClient,
private restExtractor: RestExtractor,
- private restService: RestService,
private videosService: VideoService,
private serverService: ServerService
) {}
constructor (
private router: Router,
private i18n: I18n
- ) {
- // empty
- }
+ ) { }
extractDataBool () {
return true
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'
subscribed: boolean
constructor (
- private authService: AuthService,
- private restExtractor: RestExtractor,
- private redirectService: RedirectService,
private notificationsService: NotificationsService,
private userSubscriptionService: UserSubscriptionService,
private i18n: I18n
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'
constructor (
private authHttp: HttpClient,
private serverService: ServerService,
- private restService: RestService,
private restExtractor: RestExtractor
) {}
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'
constructor (
protected formValidatorService: FormValidatorService,
private userValidatorsService: UserValidatorsService,
- private router: Router,
private notificationsService: NotificationsService,
private userService: UserService,
private serverService: ServerService,
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'
private notificationsService: NotificationsService,
private serverService: ServerService,
private videoService: VideoService,
- private authService: AuthService,
private loadingBar: LoadingBarService,
- private videoChannelService: VideoChannelService,
private videoCaptionService: VideoCaptionService,
private i18n: I18n
) {
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
private modalService: NgbModal,
private notificationsService: NotificationsService,
private i18n: I18n
- ) {
- // empty
- }
+ ) { }
show (currentVideoTimestamp?: number) {
this.currentVideoTimestamp = Math.floor(currentVideoTimestamp)
constructor (
private markdownService: MarkdownService,
private modalService: NgbModal
- ) {
- // empty
- }
+ ) { }
show () {
this.videoHTMLSupport = this.markdownService.enhancedMarkdownToHTML(this.video.support)
-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'
constructor (
private videos: VideoService,
private searchService: SearchService
- ) {
- }
+ ) { }
getRecommendations (recommendation: RecommendationInfo): Observable<Video[]> {
return this.fetchPage(1, recommendation)
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 {