aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core/routing
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-05-23 11:15:00 +0200
committerChocobozzz <me@florianbigard.com>2023-05-23 11:27:09 +0200
commit52798aa5f277492d4dd2482bca9396d2e982fa19 (patch)
treec3b8057acf3860aacc92743b9d92214ad0364fcb /client/src/app/core/routing
parentf89189907bbdff6c4bc6d3460ed9ef4c49515f17 (diff)
downloadPeerTube-52798aa5f277492d4dd2482bca9396d2e982fa19.tar.gz
PeerTube-52798aa5f277492d4dd2482bca9396d2e982fa19.tar.zst
PeerTube-52798aa5f277492d4dd2482bca9396d2e982fa19.zip
Update angular
Diffstat (limited to 'client/src/app/core/routing')
-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
7 files changed, 11 insertions, 15 deletions
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,