fix(status): show gateway auth when reachable

This commit is contained in:
Peter Steinberger
2026-01-11 01:46:37 +01:00
parent 506cc9e7a1
commit 3e6d27ac4e
4 changed files with 50 additions and 2 deletions

View File

@@ -15,6 +15,20 @@ export const formatDuration = (ms: number | null | undefined) => {
return `${(ms / 1000).toFixed(1)}s`;
};
export function formatGatewayAuthUsed(
auth: {
token?: string;
password?: string;
} | null,
): "token" | "password" | "token+password" | "none" {
const hasToken = Boolean(auth?.token?.trim());
const hasPassword = Boolean(auth?.password?.trim());
if (hasToken && hasPassword) return "token+password";
if (hasToken) return "token";
if (hasPassword) return "password";
return "none";
}
export function redactSecrets(text: string): string {
if (!text) return text;
let out = text;