Cleanup code + resolve conversion logic
This commit is contained in:
@@ -1239,15 +1239,19 @@ async function resolveHostCredentials(host: any): Promise<any> {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// Convert snake_case to camelCase for hosts without credentials
|
||||
|
||||
const result = { ...host };
|
||||
if (host.key_password !== undefined) {
|
||||
if (result.keyPassword === undefined) {
|
||||
result.keyPassword = host.key_password;
|
||||
}
|
||||
delete result.key_password;
|
||||
}
|
||||
const result = { ...host };
|
||||
if (host.key_password !== undefined) {
|
||||
// Only use the inline key_password if keyPassword hasn't been set by credential resolution
|
||||
if (result.keyPassword === undefined) {
|
||||
result.keyPassword = host.key_password;
|
||||
}
|
||||
// Always remove the snake_case version to standardize the output
|
||||
delete result.key_password;
|
||||
}
|
||||
return result;
|
||||
|
||||
@@ -877,8 +877,6 @@ export function HostManagerEditor({
|
||||
| "credential";
|
||||
setAuthTab(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"
|
||||
>
|
||||
|
||||
@@ -512,7 +512,8 @@ export const Terminal = forwardRef<any, SSHTerminalProps>(function SSHTerminal(
|
||||
cursorStyle: "bar",
|
||||
scrollback: 10000,
|
||||
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" },
|
||||
allowTransparency: true,
|
||||
convertEol: true,
|
||||
|
||||
Reference in New Issue
Block a user