Cleanup code + resolve conversion logic
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user