Cleanup code + resolve conversion logic

This commit is contained in:
LukeGus
2025-10-07 16:05:21 -05:00
parent 51be6544cd
commit 3e1388f0b3
3 changed files with 10 additions and 7 deletions

View File

@@ -1240,14 +1240,18 @@ async function resolveHostCredentials(host: any): Promise<any> {
} }
} }
// Convert snake_case to camelCase for hosts without credentials
const result = { ...host }; const result = { ...host };
if (host.key_password !== undefined) { if (host.key_password !== undefined) {
// Only use the inline key_password if keyPassword hasn't been set by credential resolution
if (result.keyPassword === undefined) { if (result.keyPassword === undefined) {
result.keyPassword = host.key_password; result.keyPassword = host.key_password;
} }
// Always remove the snake_case version to standardize the output delete result.key_password;
}
const result = { ...host };
if (host.key_password !== undefined) {
if (result.keyPassword === undefined) {
result.keyPassword = host.key_password;
}
delete result.key_password; delete result.key_password;
} }
return result; return result;

View File

@@ -877,8 +877,6 @@ export function HostManagerEditor({
| "credential"; | "credential";
setAuthTab(newAuthType); setAuthTab(newAuthType);
form.setValue("authType", newAuthType); form.setValue("authType", newAuthType);
// Don't clear other auth fields - let them persist
// The backend will only use the fields relevant to the selected authType
}} }}
className="flex-1 flex flex-col h-full min-h-0" className="flex-1 flex flex-col h-full min-h-0"
> >

View File

@@ -512,7 +512,8 @@ export const Terminal = forwardRef<any, SSHTerminalProps>(function SSHTerminal(
cursorStyle: "bar", cursorStyle: "bar",
scrollback: 10000, scrollback: 10000,
fontSize: 14, fontSize: 14,
fontFamily: '"Caskaydia Cove Nerd Font Mono", "SF Mono", Consolas, "Liberation Mono", monospace', fontFamily:
'"Caskaydia Cove Nerd Font Mono", "SF Mono", Consolas, "Liberation Mono", monospace',
theme: { background: "#18181b", foreground: "#f7f7f7" }, theme: { background: "#18181b", foreground: "#f7f7f7" },
allowTransparency: true, allowTransparency: true,
convertEol: true, convertEol: true,