diff options
Diffstat (limited to 'client/src/app/shared')
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 @@ | |||
1 | import { Injectable } from '@angular/core' | 1 | import { Injectable } from '@angular/core' |
2 | import { ActivatedRouteSnapshot, CanDeactivate, RouterStateSnapshot } from '@angular/router' | 2 | import { CanDeactivate } from '@angular/router' |
3 | import { Observable } from 'rxjs' | 3 | import { Observable } from 'rxjs' |
4 | import { ConfirmService } from '../../core/index' | 4 | import { ConfirmService } from '../../core/index' |
5 | import { I18n } from '@ngx-translate/i18n-polyfill' | 5 | import { 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' | |||
5 | import { VideosOverview as VideosOverviewServer, peertubeTranslate } from '../../../../../shared/models' | 5 | import { VideosOverview as VideosOverviewServer, peertubeTranslate } from '../../../../../shared/models' |
6 | import { environment } from '../../../environments/environment' | 6 | import { environment } from '../../../environments/environment' |
7 | import { RestExtractor } from '../rest/rest-extractor.service' | 7 | import { RestExtractor } from '../rest/rest-extractor.service' |
8 | import { RestService } from '../rest/rest.service' | ||
9 | import { VideosOverview } from '@app/shared/overview/videos-overview.model' | 8 | import { VideosOverview } from '@app/shared/overview/videos-overview.model' |
10 | import { VideoService } from '@app/shared/video/video.service' | 9 | import { VideoService } from '@app/shared/video/video.service' |
11 | import { ServerService } from '@app/core' | 10 | import { 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 @@ | |||
1 | import { Component, Input, OnInit } from '@angular/core' | 1 | import { Component, Input, OnInit } from '@angular/core' |
2 | import { AuthService } from '@app/core' | ||
3 | import { RestExtractor } from '@app/shared/rest' | ||
4 | import { RedirectService } from '@app/core/routing/redirect.service' | ||
5 | import { UserSubscriptionService } from '@app/shared/user-subscription/user-subscription.service' | 2 | import { UserSubscriptionService } from '@app/shared/user-subscription/user-subscription.service' |
6 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' | 3 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' |
7 | import { NotificationsService } from 'angular2-notifications' | 4 | import { 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' | |||
3 | import { Injectable } from '@angular/core' | 3 | import { Injectable } from '@angular/core' |
4 | import { forkJoin, Observable, of } from 'rxjs' | 4 | import { forkJoin, Observable, of } from 'rxjs' |
5 | import { peertubeTranslate, ResultList } from '../../../../../shared' | 5 | import { peertubeTranslate, ResultList } from '../../../../../shared' |
6 | import { RestExtractor, RestService } from '../rest' | 6 | import { RestExtractor } from '../rest' |
7 | import { VideoService } from '@app/shared/video/video.service' | 7 | import { VideoService } from '@app/shared/video/video.service' |
8 | import { objectToFormData, sortBy } from '@app/shared/misc/utils' | 8 | import { objectToFormData, sortBy } from '@app/shared/misc/utils' |
9 | import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model' | 9 | import { 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 | ||