Fixes
This commit is contained in:
@@ -30,7 +30,7 @@ interface SSHHost {
|
||||
folder: string;
|
||||
tags: string[];
|
||||
pin: boolean;
|
||||
authType: 'password' | 'key';
|
||||
authType: string;
|
||||
password?: string;
|
||||
key?: string;
|
||||
keyPassword?: string;
|
||||
@@ -171,7 +171,7 @@ export function SSHManagerHostEditor({ editingHost, onFormSubmit }: SSHManagerHo
|
||||
type FormData = z.infer<typeof formSchema>;
|
||||
|
||||
const form = useForm<FormData>({
|
||||
resolver: zodResolver(formSchema),
|
||||
resolver: zodResolver(formSchema) as any,
|
||||
defaultValues: {
|
||||
name: editingHost?.name || "",
|
||||
ip: editingHost?.ip || "",
|
||||
|
||||
@@ -99,7 +99,12 @@ export const SSHTerminal = forwardRef<any, SSHTerminalProps>(function SSHTermina
|
||||
const cols = terminal.cols + 1;
|
||||
const rows = terminal.rows;
|
||||
|
||||
const ws = new WebSocket('ws://localhost:8082');
|
||||
const wsUrl = window.location.hostname === 'localhost'
|
||||
? 'ws://localhost:8082'
|
||||
: `${window.location.protocol === 'https:' ? 'wss' : 'ws'}://${window.location.host}/ssh/websocket/`;
|
||||
|
||||
const ws = new WebSocket(wsUrl);
|
||||
|
||||
webSocketRef.current = ws;
|
||||
|
||||
ws.addEventListener('open', () => {
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
@@ -53,9 +53,4 @@ app.use((err: unknown, req: express.Request, res: express.Response, next: expres
|
||||
});
|
||||
|
||||
const PORT = 8081;
|
||||
app.listen(PORT, () => {
|
||||
logger.success(`Database server started on port ${PORT}`);
|
||||
}).on('error', (err) => {
|
||||
logger.error(`Failed to start database server:`, err);
|
||||
process.exit(1);
|
||||
});
|
||||
app.listen(PORT, () => {});
|
||||
Reference in New Issue
Block a user