refactor(core): improve auth flow and update service configurations

Refactor authentication handling and update environment-specific
configurations for local development.

- Update `LayoutComponent` to handle asynchronous logout and redirect
  to login page.
- Update `LoginPage` to navigate to home after successful submission.
- Hardcode API and image URLs to local development IP in `HttpService`
  and `VoiceStreamConfig`.
- Adjust typing animation delay in `HomePage` for more natural feel.
- Comment out unused settings items and update `AiChatInputComponent`
  border radius.
This commit is contained in:
PeymanHonarjoo
2026-10-08 13:45:30 +03:30
parent f6ce43453a
commit 72e7d0a007
7 changed files with 31 additions and 13 deletions
@@ -37,10 +37,15 @@ export const EVENT_STREAM_HEADERS = {
providedIn: 'root',
})
export class HttpService {
private readonly baseUrl = `${window.location.protocol}//${window.location.hostname}/api`;
public readonly backendUrl = `${window.location.protocol}//${window.location.hostname}/api`;
public readonly apiUrl = `${window.location.protocol}//${window.location.hostname}/api`;
public readonly imagesUrl = `${window.location.protocol}//${window.location.hostname}`;
// private readonly baseUrl = `${window.location.protocol}//${window.location.hostname}/api`;
// public readonly backendUrl = `${window.location.protocol}//${window.location.hostname}/api`;
// public readonly apiUrl = `${window.location.protocol}//${window.location.hostname}/api`;
// public readonly imagesUrl = `${window.location.protocol}//${window.location.hostname}`;
private readonly baseUrl = `http://192.168.180.151:1321`;
public readonly backendUrl = `http://192.168.180.151:1321`;
public readonly apiUrl = `http://192.168.180.151:1321`;
public readonly imagesUrl = `http://192.168.180.151:1321`;
constructor(
private readonly http: HttpClient,
@@ -98,7 +98,7 @@ export interface VoiceStreamConfig {
export const DEFAULT_VOICE_STREAM_CONFIG: VoiceStreamConfig = {
apiBase: '/api/v1',
apiOrigin: '',
apiOrigin: 'http://192.168.180.151:1322',
inputSampleRate: 16000,
outputSampleRate: 24000,
frameMs: 20,