Added top bar on all pages. Simplified TTS login component. Fixed some issues. Removed redirects for now.

This commit is contained in:
Tom
2025-04-01 21:12:01 +00:00
parent d44ec50a6a
commit 055885837c
30 changed files with 402 additions and 186 deletions

View File

@ -35,14 +35,20 @@ export class ConnectionCallbackComponent implements OnInit {
return;
}
this.http.get(`${environment.API_HOST}/auth/connections?token=${params['access_token']}&state=${params['state']}&expires_in=${params['expires_in']}`).subscribe(async (d: any) => {
const data = d.data;
this.success = true;
console.log(params);
this.http.get(`${environment.API_HOST}/auth/connections?token=${params['access_token']}&state=${params['state']}&expires_in=${params['expires_in']}`).subscribe({
next: async (d: any) => {
const data = d.data;
this.success = true;
await setTimeout(async () => {
this.client.createConnection(data.connection.name, data.connection.type, data.connection.clientId, params['access_token'], data.connection.grantType, params['scope'], data.expires_at);
await this.router.navigate(['connections']);
}, 2000)
console.log('about to wait for 2 seconds')
await setTimeout(async () => {
console.log('create connection')
this.client.createConnection(data.connection.name, data.connection.type, data.connection.clientId, params['access_token'], data.connection.grantType, params['scope'], data.expires_at);
await this.router.navigate(['connections'])
}, 2000)
},
error: async () => await this.router.navigate(['connections'])
});
;
}