Added user management for groups. Improved user experience slightly. Added some error checks for request acks.
This commit is contained in:
@ -5,8 +5,7 @@ import { MatSelectModule } from '@angular/material/select';
|
||||
import { MatFormFieldModule } from '@angular/material/form-field';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import EventService from '../../shared/services/EventService';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { first, Subscription, timeout } from 'rxjs';
|
||||
import { HermesClientService } from '../../hermes-client.service';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
@ -20,16 +19,16 @@ import { ApiKeyService } from '../../shared/services/api/api-key.service';
|
||||
styleUrl: './tts-login.component.scss'
|
||||
})
|
||||
export class TtsLoginComponent implements OnInit, OnDestroy {
|
||||
keyService = inject(ApiKeyService);
|
||||
route = inject(ActivatedRoute);
|
||||
private readonly client = inject(HermesClientService);
|
||||
private readonly keyService = inject(ApiKeyService);
|
||||
private readonly events = inject(EventService);
|
||||
private readonly route = inject(ActivatedRoute);
|
||||
|
||||
api_keys: { id: string, label: string }[] = [];
|
||||
selected_api_key: string | undefined;
|
||||
|
||||
private subscriptions: Subscription[] = [];
|
||||
|
||||
constructor(private hermes: HermesClientService, private events: EventService, private http: HttpClient, private router: Router) {
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.route.data.subscribe(d => this.api_keys = d['keys']);
|
||||
@ -50,10 +49,10 @@ export class TtsLoginComponent implements OnInit, OnDestroy {
|
||||
this.subscriptions.forEach(s => s.unsubscribe());
|
||||
}
|
||||
|
||||
login() {
|
||||
login(): void {
|
||||
if (!this.selected_api_key)
|
||||
return;
|
||||
|
||||
this.hermes.login(this.selected_api_key);
|
||||
this.client.login(this.selected_api_key);
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,8 @@
|
||||
<mat-card-content>
|
||||
<impersonation />
|
||||
</mat-card-content>
|
||||
<mat-card-actions class="actions">
|
||||
<mat-card-actions class="actions"
|
||||
align="end">
|
||||
<div>
|
||||
@if (isTTSLoggedIn) {
|
||||
<button mat-raised-button
|
||||
|
Reference in New Issue
Block a user