This commit is contained in:
Bastian Wagner
2026-07-15 15:53:27 +02:00
parent a79988b35c
commit d51d915c74
8 changed files with 119 additions and 36 deletions

View File

@@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"scripts": {
"start": "ng serve --host 0.0.0.0 --port 4200",
"start": "ng serve --host 0.0.0.0 --port 4200 --proxy-config proxy.conf.json",
"build": "ng build",
"lint": "eslint \"src/**/*.ts\""
},

42
apps/web/proxy.conf.json Normal file
View File

@@ -0,0 +1,42 @@
{
"/.well-known": {
"target": "http://localhost:3000",
"secure": false,
"changeOrigin": true
},
"/oidc": {
"target": "http://localhost:3000",
"secure": false,
"changeOrigin": true
},
"/interaction": {
"target": "http://localhost:3000",
"secure": false,
"changeOrigin": true
},
"/auth": {
"target": "http://localhost:3000",
"secure": false,
"changeOrigin": true
},
"/account": {
"target": "http://localhost:3000",
"secure": false,
"changeOrigin": true
},
"/admin": {
"target": "http://localhost:3000",
"secure": false,
"changeOrigin": true
},
"/password": {
"target": "http://localhost:3000",
"secure": false,
"changeOrigin": true
},
"/registration": {
"target": "http://localhost:3000",
"secure": false,
"changeOrigin": true
}
}

View File

@@ -47,7 +47,12 @@ export class AdminRegistrationsComponent implements OnInit {
}
private load(): void {
this.http.get<any[]>(`${this.apiBaseUrl}/admin/registrations`).subscribe({ next: (items) => this.registrations.set(items), error: (e) => this.error(e) });
this.http
.get<any[]>(`${this.apiBaseUrl}/admin/registrations`, {
headers: { 'Cache-Control': 'no-cache', Pragma: 'no-cache' },
params: { _: Date.now() },
})
.subscribe({ next: (items) => this.registrations.set(items), error: (e) => this.error(e) });
}
private error(error: unknown): void {

View File

@@ -12,20 +12,14 @@ import { API_BASE_URL } from '../shared/api-base-url';
<section class="panel wide">
<h1>Registrieren</h1>
<form [formGroup]="form" (ngSubmit)="submit()">
<div class="grid">
<label>
Benutzername
<input formControlName="username" autocomplete="username">
</label>
<label>
Anzeigename
<input formControlName="displayName" autocomplete="name">
</label>
</div>
<label>
E-Mail
<input type="email" formControlName="email" autocomplete="email">
</label>
<label>
Anzeigename
<input formControlName="displayName" autocomplete="name">
</label>
<label>
Passwort
<input type="password" formControlName="password" autocomplete="new-password">
@@ -55,9 +49,8 @@ export class RegisterComponent {
@Inject(API_BASE_URL) private readonly apiBaseUrl: string,
) {
this.form = this.fb.nonNullable.group({
username: ['', [Validators.required, Validators.minLength(3), Validators.pattern(/^[a-zA-Z0-9._-]+$/)]],
displayName: ['', Validators.required],
email: ['', [Validators.required, Validators.email]],
displayName: ['', Validators.required],
password: ['', [Validators.required, Validators.minLength(12)]],
});
}