aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app')
-rw-r--r--client/src/app/+about/about-instance/about-instance.resolver.ts3
-rw-r--r--client/src/app/+search/shared/abstract-lazy-load.resolver.ts4
-rw-r--r--client/src/app/+videos/+video-edit/video-update.resolver.ts4
-rw-r--r--client/src/app/core/rest/rest-table.ts7
-rw-r--r--client/src/app/core/routing/can-deactivate-guard.service.ts3
-rw-r--r--client/src/app/core/routing/login-guard.service.ts4
-rw-r--r--client/src/app/core/routing/menu-guard.service.ts3
-rw-r--r--client/src/app/core/routing/meta-guard.service.ts4
-rw-r--r--client/src/app/core/routing/server-config-resolver.service.ts4
-rw-r--r--client/src/app/core/routing/unlogged-guard.service.ts4
-rw-r--r--client/src/app/core/routing/user-right-guard.service.ts4
-rw-r--r--client/src/app/shared/shared-custom-markup/custom-markup.service.ts2
-rw-r--r--client/src/app/shared/shared-main/router/actor-redirect-guard.service.ts4
-rw-r--r--client/src/app/shared/shared-main/video/video.resolver.ts4
14 files changed, 25 insertions, 29 deletions
diff --git a/client/src/app/+about/about-instance/about-instance.resolver.ts b/client/src/app/+about/about-instance/about-instance.resolver.ts
index 94388e71d..5c09b0f46 100644
--- a/client/src/app/+about/about-instance/about-instance.resolver.ts
+++ b/client/src/app/+about/about-instance/about-instance.resolver.ts
@@ -1,7 +1,6 @@
1import { forkJoin, Observable } from 'rxjs' 1import { forkJoin, Observable } from 'rxjs'
2import { map, switchMap } from 'rxjs/operators' 2import { map, switchMap } from 'rxjs/operators'
3import { Injectable } from '@angular/core' 3import { Injectable } from '@angular/core'
4import { Resolve } from '@angular/router'
5import { ServerService } from '@app/core' 4import { ServerService } from '@app/core'
6import { CustomMarkupService } from '@app/shared/shared-custom-markup' 5import { CustomMarkupService } from '@app/shared/shared-custom-markup'
7import { AboutHTML, InstanceService } from '@app/shared/shared-instance' 6import { AboutHTML, InstanceService } from '@app/shared/shared-instance'
@@ -17,7 +16,7 @@ export type ResolverData = {
17} 16}
18 17
19@Injectable() 18@Injectable()
20export class AboutInstanceResolver implements Resolve<any> { 19export class AboutInstanceResolver {
21 20
22 constructor ( 21 constructor (
23 private instanceService: InstanceService, 22 private instanceService: InstanceService,
diff --git a/client/src/app/+search/shared/abstract-lazy-load.resolver.ts b/client/src/app/+search/shared/abstract-lazy-load.resolver.ts
index 7551d977d..6940a7a9b 100644
--- a/client/src/app/+search/shared/abstract-lazy-load.resolver.ts
+++ b/client/src/app/+search/shared/abstract-lazy-load.resolver.ts
@@ -1,10 +1,10 @@
1import { Observable } from 'rxjs' 1import { Observable } from 'rxjs'
2import { map } from 'rxjs/operators' 2import { map } from 'rxjs/operators'
3import { ActivatedRouteSnapshot, Resolve, Router } from '@angular/router' 3import { ActivatedRouteSnapshot, Router } from '@angular/router'
4import { logger } from '@root-helpers/logger' 4import { logger } from '@root-helpers/logger'
5import { ResultList } from '@shared/models' 5import { ResultList } from '@shared/models'
6 6
7export abstract class AbstractLazyLoadResolver <T> implements Resolve<any> { 7export abstract class AbstractLazyLoadResolver <T> {
8 protected router: Router 8 protected router: Router
9 9
10 resolve (route: ActivatedRouteSnapshot) { 10 resolve (route: ActivatedRouteSnapshot) {
diff --git a/client/src/app/+videos/+video-edit/video-update.resolver.ts b/client/src/app/+videos/+video-edit/video-update.resolver.ts
index 524ceae10..6612d22de 100644
--- a/client/src/app/+videos/+video-edit/video-update.resolver.ts
+++ b/client/src/app/+videos/+video-edit/video-update.resolver.ts
@@ -1,14 +1,14 @@
1import { forkJoin, of } from 'rxjs' 1import { forkJoin, of } from 'rxjs'
2import { map, switchMap } from 'rxjs/operators' 2import { map, switchMap } from 'rxjs/operators'
3import { Injectable } from '@angular/core' 3import { Injectable } from '@angular/core'
4import { ActivatedRouteSnapshot, Resolve } from '@angular/router' 4import { ActivatedRouteSnapshot } from '@angular/router'
5import { AuthService } from '@app/core' 5import { AuthService } from '@app/core'
6import { listUserChannelsForSelect } from '@app/helpers' 6import { listUserChannelsForSelect } from '@app/helpers'
7import { VideoCaptionService, VideoDetails, VideoService } from '@app/shared/shared-main' 7import { VideoCaptionService, VideoDetails, VideoService } from '@app/shared/shared-main'
8import { LiveVideoService } from '@app/shared/shared-video-live' 8import { LiveVideoService } from '@app/shared/shared-video-live'
9 9
10@Injectable() 10@Injectable()
11export class VideoUpdateResolver implements Resolve<any> { 11export class VideoUpdateResolver {
12 constructor ( 12 constructor (
13 private videoService: VideoService, 13 private videoService: VideoService,
14 private liveVideoService: LiveVideoService, 14 private liveVideoService: LiveVideoService,
diff --git a/client/src/app/core/rest/rest-table.ts b/client/src/app/core/rest/rest-table.ts
index 707110d7f..ec4c570d4 100644
--- a/client/src/app/core/rest/rest-table.ts
+++ b/client/src/app/core/rest/rest-table.ts
@@ -1,5 +1,6 @@
1import debug from 'debug' 1import debug from 'debug'
2import { LazyLoadEvent, SortMeta } from 'primeng/api' 2import { SortMeta } from 'primeng/api'
3import { TableLazyLoadEvent } from 'primeng/table'
3import { ActivatedRoute, Router } from '@angular/router' 4import { ActivatedRoute, Router } from '@angular/router'
4import { logger } from '@root-helpers/logger' 5import { logger } from '@root-helpers/logger'
5import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' 6import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage'
@@ -46,12 +47,12 @@ export abstract class RestTable <T = unknown> {
46 peertubeLocalStorage.setItem(this.getSortLocalStorageKey(), JSON.stringify(this.sort)) 47 peertubeLocalStorage.setItem(this.getSortLocalStorageKey(), JSON.stringify(this.sort))
47 } 48 }
48 49
49 loadLazy (event: LazyLoadEvent) { 50 loadLazy (event: TableLazyLoadEvent) {
50 debugLogger('Load lazy %o.', event) 51 debugLogger('Load lazy %o.', event)
51 52
52 this.sort = { 53 this.sort = {
53 order: event.sortOrder, 54 order: event.sortOrder,
54 field: event.sortField 55 field: event.sortField as string
55 } 56 }
56 57
57 this.rowsPerPage = event.rows 58 this.rowsPerPage = event.rows
diff --git a/client/src/app/core/routing/can-deactivate-guard.service.ts b/client/src/app/core/routing/can-deactivate-guard.service.ts
index 8fce495e9..638e8e699 100644
--- a/client/src/app/core/routing/can-deactivate-guard.service.ts
+++ b/client/src/app/core/routing/can-deactivate-guard.service.ts
@@ -1,6 +1,5 @@
1import { Observable } from 'rxjs' 1import { Observable } from 'rxjs'
2import { Injectable } from '@angular/core' 2import { Injectable } from '@angular/core'
3import { CanDeactivate } from '@angular/router'
4import { ConfirmService } from '@app/core/confirm' 3import { ConfirmService } from '@app/core/confirm'
5 4
6export type CanComponentDeactivateResult = { text?: string, canDeactivate: Observable<boolean> | boolean } 5export type CanComponentDeactivateResult = { text?: string, canDeactivate: Observable<boolean> | boolean }
@@ -10,7 +9,7 @@ export interface CanComponentDeactivate {
10} 9}
11 10
12@Injectable() 11@Injectable()
13export class CanDeactivateGuard implements CanDeactivate<CanComponentDeactivate> { 12export class CanDeactivateGuard {
14 13
15 constructor (private confirmService: ConfirmService) { } 14 constructor (private confirmService: ConfirmService) { }
16 15
diff --git a/client/src/app/core/routing/login-guard.service.ts b/client/src/app/core/routing/login-guard.service.ts
index 2f5a31e7f..ecb902625 100644
--- a/client/src/app/core/routing/login-guard.service.ts
+++ b/client/src/app/core/routing/login-guard.service.ts
@@ -1,10 +1,10 @@
1import { Injectable } from '@angular/core' 1import { Injectable } from '@angular/core'
2import { ActivatedRouteSnapshot, CanActivate, CanActivateChild, RouterStateSnapshot } from '@angular/router' 2import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'
3import { AuthService } from '../auth/auth.service' 3import { AuthService } from '../auth/auth.service'
4import { RedirectService } from './redirect.service' 4import { RedirectService } from './redirect.service'
5 5
6@Injectable() 6@Injectable()
7export class LoginGuard implements CanActivate, CanActivateChild { 7export class LoginGuard {
8 8
9 constructor ( 9 constructor (
10 private auth: AuthService, 10 private auth: AuthService,
diff --git a/client/src/app/core/routing/menu-guard.service.ts b/client/src/app/core/routing/menu-guard.service.ts
index 58ad31cf4..765862b59 100644
--- a/client/src/app/core/routing/menu-guard.service.ts
+++ b/client/src/app/core/routing/menu-guard.service.ts
@@ -1,9 +1,8 @@
1import { Injectable } from '@angular/core' 1import { Injectable } from '@angular/core'
2import { CanActivate, CanDeactivate } from '@angular/router'
3import { MenuService } from '../menu' 2import { MenuService } from '../menu'
4import { ScreenService } from '../wrappers' 3import { ScreenService } from '../wrappers'
5 4
6abstract class MenuGuard implements CanActivate, CanDeactivate<any> { 5abstract class MenuGuard {
7 canDeactivate = this.canActivate 6 canDeactivate = this.canActivate
8 7
9 constructor (protected menu: MenuService, protected screen: ScreenService, protected display: boolean) { 8 constructor (protected menu: MenuService, protected screen: ScreenService, protected display: boolean) {
diff --git a/client/src/app/core/routing/meta-guard.service.ts b/client/src/app/core/routing/meta-guard.service.ts
index 851404959..b68e06abe 100644
--- a/client/src/app/core/routing/meta-guard.service.ts
+++ b/client/src/app/core/routing/meta-guard.service.ts
@@ -1,9 +1,9 @@
1import { Injectable } from '@angular/core' 1import { Injectable } from '@angular/core'
2import { ActivatedRouteSnapshot, CanActivate, CanActivateChild } from '@angular/router' 2import { ActivatedRouteSnapshot } from '@angular/router'
3import { MetaService } from './meta.service' 3import { MetaService } from './meta.service'
4 4
5@Injectable() 5@Injectable()
6export class MetaGuard implements CanActivate, CanActivateChild { 6export class MetaGuard {
7 7
8 constructor (private meta: MetaService) { } 8 constructor (private meta: MetaService) { }
9 9
diff --git a/client/src/app/core/routing/server-config-resolver.service.ts b/client/src/app/core/routing/server-config-resolver.service.ts
index 0ce2023a0..8d2390d38 100644
--- a/client/src/app/core/routing/server-config-resolver.service.ts
+++ b/client/src/app/core/routing/server-config-resolver.service.ts
@@ -1,10 +1,8 @@
1import { Injectable } from '@angular/core' 1import { Injectable } from '@angular/core'
2import { Resolve } from '@angular/router'
3import { ServerService } from '../server' 2import { ServerService } from '../server'
4import { ServerConfig } from '@shared/models'
5 3
6@Injectable() 4@Injectable()
7export class ServerConfigResolver implements Resolve<ServerConfig> { 5export class ServerConfigResolver {
8 constructor (private server: ServerService) {} 6 constructor (private server: ServerService) {}
9 7
10 resolve () { 8 resolve () {
diff --git a/client/src/app/core/routing/unlogged-guard.service.ts b/client/src/app/core/routing/unlogged-guard.service.ts
index 0be7911a0..9920ee41d 100644
--- a/client/src/app/core/routing/unlogged-guard.service.ts
+++ b/client/src/app/core/routing/unlogged-guard.service.ts
@@ -1,10 +1,10 @@
1import { Injectable } from '@angular/core' 1import { Injectable } from '@angular/core'
2import { ActivatedRouteSnapshot, CanActivate, CanActivateChild, RouterStateSnapshot } from '@angular/router' 2import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'
3import { AuthService } from '../auth/auth.service' 3import { AuthService } from '../auth/auth.service'
4import { RedirectService } from './redirect.service' 4import { RedirectService } from './redirect.service'
5 5
6@Injectable() 6@Injectable()
7export class UnloggedGuard implements CanActivate, CanActivateChild { 7export class UnloggedGuard {
8 8
9 constructor ( 9 constructor (
10 private auth: AuthService, 10 private auth: AuthService,
diff --git a/client/src/app/core/routing/user-right-guard.service.ts b/client/src/app/core/routing/user-right-guard.service.ts
index c6bd05bb6..9f293f628 100644
--- a/client/src/app/core/routing/user-right-guard.service.ts
+++ b/client/src/app/core/routing/user-right-guard.service.ts
@@ -1,10 +1,10 @@
1import { Injectable } from '@angular/core' 1import { Injectable } from '@angular/core'
2import { ActivatedRouteSnapshot, CanActivate, CanActivateChild, RouterStateSnapshot } from '@angular/router' 2import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'
3import { AuthService } from '../auth/auth.service' 3import { AuthService } from '../auth/auth.service'
4import { RedirectService } from './redirect.service' 4import { RedirectService } from './redirect.service'
5 5
6@Injectable() 6@Injectable()
7export class UserRightGuard implements CanActivate, CanActivateChild { 7export class UserRightGuard {
8 8
9 constructor ( 9 constructor (
10 private redirectService: RedirectService, 10 private redirectService: RedirectService,
diff --git a/client/src/app/shared/shared-custom-markup/custom-markup.service.ts b/client/src/app/shared/shared-custom-markup/custom-markup.service.ts
index 618c3dd4f..b49f64834 100644
--- a/client/src/app/shared/shared-custom-markup/custom-markup.service.ts
+++ b/client/src/app/shared/shared-custom-markup/custom-markup.service.ts
@@ -1,6 +1,7 @@
1import { firstValueFrom } from 'rxjs' 1import { firstValueFrom } from 'rxjs'
2import { ComponentRef, Injectable } from '@angular/core' 2import { ComponentRef, Injectable } from '@angular/core'
3import { MarkdownService } from '@app/core' 3import { MarkdownService } from '@app/core'
4import { logger } from '@root-helpers/logger'
4import { 5import {
5 ButtonMarkupData, 6 ButtonMarkupData,
6 ChannelMiniatureMarkupData, 7 ChannelMiniatureMarkupData,
@@ -20,7 +21,6 @@ import {
20 VideosListMarkupComponent 21 VideosListMarkupComponent
21} from './peertube-custom-tags' 22} from './peertube-custom-tags'
22import { CustomMarkupComponent } from './peertube-custom-tags/shared' 23import { CustomMarkupComponent } from './peertube-custom-tags/shared'
23import { logger } from '@root-helpers/logger'
24 24
25type AngularBuilderFunction = (el: HTMLElement) => ComponentRef<CustomMarkupComponent> 25type AngularBuilderFunction = (el: HTMLElement) => ComponentRef<CustomMarkupComponent>
26type HTMLBuilderFunction = (el: HTMLElement) => HTMLElement 26type HTMLBuilderFunction = (el: HTMLElement) => HTMLElement
diff --git a/client/src/app/shared/shared-main/router/actor-redirect-guard.service.ts b/client/src/app/shared/shared-main/router/actor-redirect-guard.service.ts
index ce185829c..53a48f8a1 100644
--- a/client/src/app/shared/shared-main/router/actor-redirect-guard.service.ts
+++ b/client/src/app/shared/shared-main/router/actor-redirect-guard.service.ts
@@ -1,12 +1,12 @@
1import { forkJoin, of } from 'rxjs' 1import { forkJoin, of } from 'rxjs'
2import { catchError, map } from 'rxjs/operators' 2import { catchError, map } from 'rxjs/operators'
3import { Injectable } from '@angular/core' 3import { Injectable } from '@angular/core'
4import { ActivatedRouteSnapshot, CanActivate, Router } from '@angular/router' 4import { ActivatedRouteSnapshot, Router } from '@angular/router'
5import { AccountService } from '../account' 5import { AccountService } from '../account'
6import { VideoChannelService } from '../video-channel' 6import { VideoChannelService } from '../video-channel'
7 7
8@Injectable() 8@Injectable()
9export class ActorRedirectGuard implements CanActivate { 9export class ActorRedirectGuard {
10 10
11 constructor ( 11 constructor (
12 private router: Router, 12 private router: Router,
diff --git a/client/src/app/shared/shared-main/video/video.resolver.ts b/client/src/app/shared/shared-main/video/video.resolver.ts
index 65b7230ce..dc07bb5da 100644
--- a/client/src/app/shared/shared-main/video/video.resolver.ts
+++ b/client/src/app/shared/shared-main/video/video.resolver.ts
@@ -1,9 +1,9 @@
1import { Injectable } from '@angular/core' 1import { Injectable } from '@angular/core'
2import { ActivatedRouteSnapshot, Resolve } from '@angular/router' 2import { ActivatedRouteSnapshot } from '@angular/router'
3import { VideoService } from './video.service' 3import { VideoService } from './video.service'
4 4
5@Injectable() 5@Injectable()
6export class VideoResolver implements Resolve<any> { 6export class VideoResolver {
7 constructor ( 7 constructor (
8 private videoService: VideoService 8 private videoService: VideoService
9 ) { 9 ) {