fix: IMAP-Serveradresse dynamisch aus Backend laden
Hardcodierte 192.168.1.131 in settings/page.tsx ersetzt durch
dynamischen API-Call GET /api/system/info → {fqdn, imap_port}.
Fallback auf window.location.hostname wenn API nicht antwortet.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
3b05e949dd
commit
2a91f6e249
@@ -6,6 +6,12 @@ export interface HealthResponse {
|
||||
status: string;
|
||||
}
|
||||
|
||||
export interface SystemInfo {
|
||||
fqdn: string;
|
||||
imap_port: number;
|
||||
imap_port_alt: number;
|
||||
}
|
||||
|
||||
export interface SMTPStatus {
|
||||
// global daemon fields (superadmin)
|
||||
running?: boolean;
|
||||
@@ -157,6 +163,10 @@ export async function getHealth(): Promise<HealthResponse> {
|
||||
return request<HealthResponse>("/api/health");
|
||||
}
|
||||
|
||||
export async function getSystemInfo(): Promise<SystemInfo> {
|
||||
return request<SystemInfo>("/api/system/info");
|
||||
}
|
||||
|
||||
export async function getSMTPStatus(): Promise<SMTPStatus> {
|
||||
return request<SMTPStatus>("/api/admin/smtp/status");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user