aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared')
-rw-r--r--client/src/app/shared/guards/can-deactivate-guard.service.ts8
-rw-r--r--client/src/app/shared/overview/overview.service.ts2
-rw-r--r--client/src/app/shared/rest/rest-extractor.service.ts4
-rw-r--r--client/src/app/shared/user-subscription/subscribe-button.component.ts6
-rw-r--r--client/src/app/shared/video-caption/video-caption.service.ts3
5 files changed, 4 insertions, 19 deletions
diff --git a/client/src/app/shared/guards/can-deactivate-guard.service.ts b/client/src/app/shared/guards/can-deactivate-guard.service.ts
index c038a5c0e..e2a79e8c4 100644
--- a/client/src/app/shared/guards/can-deactivate-guard.service.ts
+++ b/client/src/app/shared/guards/can-deactivate-guard.service.ts
@@ -1,5 +1,5 @@
1import { Injectable } from '@angular/core' 1import { Injectable } from '@angular/core'
2import { ActivatedRouteSnapshot, CanDeactivate, RouterStateSnapshot } from '@angular/router' 2import { CanDeactivate } from '@angular/router'
3import { Observable } from 'rxjs' 3import { Observable } from 'rxjs'
4import { ConfirmService } from '../../core/index' 4import { ConfirmService } from '../../core/index'
5import { I18n } from '@ngx-translate/i18n-polyfill' 5import { I18n } from '@ngx-translate/i18n-polyfill'
@@ -15,11 +15,7 @@ export class CanDeactivateGuard implements CanDeactivate<CanComponentDeactivate>
15 private i18n: I18n 15 private i18n: I18n
16 ) { } 16 ) { }
17 17
18 canDeactivate (component: CanComponentDeactivate, 18 canDeactivate (component: CanComponentDeactivate) {
19 currentRoute: ActivatedRouteSnapshot,
20 currentState: RouterStateSnapshot,
21 nextState: RouterStateSnapshot
22 ) {
23 const result = component.canDeactivate() 19 const result = component.canDeactivate()
24 const text = result.text || this.i18n('All unsaved data will be lost, are you sure you want to leave this page?') 20 const text = result.text || this.i18n('All unsaved data will be lost, are you sure you want to leave this page?')
25 21
diff --git a/client/src/app/shared/overview/overview.service.ts b/client/src/app/shared/overview/overview.service.ts
index 097079e6d..98dba2d97 100644
--- a/client/src/app/shared/overview/overview.service.ts
+++ b/client/src/app/shared/overview/overview.service.ts
@@ -5,7 +5,6 @@ import { forkJoin, Observable, of } from 'rxjs'
5import { VideosOverview as VideosOverviewServer, peertubeTranslate } from '../../../../../shared/models' 5import { VideosOverview as VideosOverviewServer, peertubeTranslate } from '../../../../../shared/models'
6import { environment } from '../../../environments/environment' 6import { environment } from '../../../environments/environment'
7import { RestExtractor } from '../rest/rest-extractor.service' 7import { RestExtractor } from '../rest/rest-extractor.service'
8import { RestService } from '../rest/rest.service'
9import { VideosOverview } from '@app/shared/overview/videos-overview.model' 8import { VideosOverview } from '@app/shared/overview/videos-overview.model'
10import { VideoService } from '@app/shared/video/video.service' 9import { VideoService } from '@app/shared/video/video.service'
11import { ServerService } from '@app/core' 10import { ServerService } from '@app/core'
@@ -18,7 +17,6 @@ export class OverviewService {
18 constructor ( 17 constructor (
19 private authHttp: HttpClient, 18 private authHttp: HttpClient,
20 private restExtractor: RestExtractor, 19 private restExtractor: RestExtractor,
21 private restService: RestService,
22 private videosService: VideoService, 20 private videosService: VideoService,
23 private serverService: ServerService 21 private serverService: ServerService
24 ) {} 22 ) {}
diff --git a/client/src/app/shared/rest/rest-extractor.service.ts b/client/src/app/shared/rest/rest-extractor.service.ts
index 0d5b6d6f3..6492aa66d 100644
--- a/client/src/app/shared/rest/rest-extractor.service.ts
+++ b/client/src/app/shared/rest/rest-extractor.service.ts
@@ -11,9 +11,7 @@ export class RestExtractor {
11 constructor ( 11 constructor (
12 private router: Router, 12 private router: Router,
13 private i18n: I18n 13 private i18n: I18n
14 ) { 14 ) { }
15 // empty
16 }
17 15
18 extractDataBool () { 16 extractDataBool () {
19 return true 17 return true
diff --git a/client/src/app/shared/user-subscription/subscribe-button.component.ts b/client/src/app/shared/user-subscription/subscribe-button.component.ts
index ba7acf69a..b5873a2ee 100644
--- a/client/src/app/shared/user-subscription/subscribe-button.component.ts
+++ b/client/src/app/shared/user-subscription/subscribe-button.component.ts
@@ -1,7 +1,4 @@
1import { Component, Input, OnInit } from '@angular/core' 1import { Component, Input, OnInit } from '@angular/core'
2import { AuthService } from '@app/core'
3import { RestExtractor } from '@app/shared/rest'
4import { RedirectService } from '@app/core/routing/redirect.service'
5import { UserSubscriptionService } from '@app/shared/user-subscription/user-subscription.service' 2import { UserSubscriptionService } from '@app/shared/user-subscription/user-subscription.service'
6import { VideoChannel } from '@app/shared/video-channel/video-channel.model' 3import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
7import { NotificationsService } from 'angular2-notifications' 4import { NotificationsService } from 'angular2-notifications'
@@ -20,9 +17,6 @@ export class SubscribeButtonComponent implements OnInit {
20 subscribed: boolean 17 subscribed: boolean
21 18
22 constructor ( 19 constructor (
23 private authService: AuthService,
24 private restExtractor: RestExtractor,
25 private redirectService: RedirectService,
26 private notificationsService: NotificationsService, 20 private notificationsService: NotificationsService,
27 private userSubscriptionService: UserSubscriptionService, 21 private userSubscriptionService: UserSubscriptionService,
28 private i18n: I18n 22 private i18n: I18n
diff --git a/client/src/app/shared/video-caption/video-caption.service.ts b/client/src/app/shared/video-caption/video-caption.service.ts
index 08fd61265..a1838ab16 100644
--- a/client/src/app/shared/video-caption/video-caption.service.ts
+++ b/client/src/app/shared/video-caption/video-caption.service.ts
@@ -3,7 +3,7 @@ import { HttpClient } from '@angular/common/http'
3import { Injectable } from '@angular/core' 3import { Injectable } from '@angular/core'
4import { forkJoin, Observable, of } from 'rxjs' 4import { forkJoin, Observable, of } from 'rxjs'
5import { peertubeTranslate, ResultList } from '../../../../../shared' 5import { peertubeTranslate, ResultList } from '../../../../../shared'
6import { RestExtractor, RestService } from '../rest' 6import { RestExtractor } from '../rest'
7import { VideoService } from '@app/shared/video/video.service' 7import { VideoService } from '@app/shared/video/video.service'
8import { objectToFormData, sortBy } from '@app/shared/misc/utils' 8import { objectToFormData, sortBy } from '@app/shared/misc/utils'
9import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model' 9import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model'
@@ -15,7 +15,6 @@ export class VideoCaptionService {
15 constructor ( 15 constructor (
16 private authHttp: HttpClient, 16 private authHttp: HttpClient,
17 private serverService: ServerService, 17 private serverService: ServerService,
18 private restService: RestService,
19 private restExtractor: RestExtractor 18 private restExtractor: RestExtractor
20 ) {} 19 ) {}
21 20