upgrade dependencies and migrate

This commit is contained in:
_Bastler
2025-05-11 18:05:06 +02:00
parent 58f3baf1bc
commit 3c8e4bf793
54 changed files with 4312 additions and 3428 deletions
@@ -1,14 +1,15 @@
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import { Auth2FAService } from '../../services/auth.2fa.service';
import { Router, ActivatedRoute } from '@angular/router';
import { environment } from '../../../environments/environment';
@Component({
standalone: false,
selector: 'app-login-totp',
templateUrl: './login-totp.component.html',
styleUrls: [ './login-totp.component.scss' ]
styleUrls: ['./login-totp.component.scss']
})
export class LoginTotpComponent implements OnInit {
@@ -22,14 +23,14 @@ export class LoginTotpComponent implements OnInit {
ngOnInit() {
this.form = this.formBuilder.group({
code: [ '', Validators.required ],
keep: [ '' ]
code: ['', Validators.required],
keep: ['']
});
this.route.queryParams.subscribe({
next: (params) => {
if (params[ 'target' ]) {
this.targetRoute = params[ 'target' ];
if (params['target']) {
this.targetRoute = params['target'];
}
}
});
@@ -40,7 +41,7 @@ export class LoginTotpComponent implements OnInit {
if (this.form.valid) {
this.auth2FAService.login('totp', this.form.get('code').value, this.form.get('keep').value).subscribe({
next: (response: any) => {
this.router.navigate([ this.targetRoute ]);
this.router.navigate([this.targetRoute]);
},
error: (error) => {
this.loginInvalid = true;