From a81ab8e7efdf765ea0e0e3f8ffa61c8456de4f20 Mon Sep 17 00:00:00 2001 From: LukeGus Date: Sat, 1 Nov 2025 01:35:09 -0500 Subject: [PATCH] fix: None auth issues and macOS build failure and rename files for consistency --- .github/workflows/electron.yml | 2 +- src/backend/database/routes/users.ts | 8 ---- src/backend/ssh/file-manager.ts | 12 ++++++ src/backend/ssh/terminal.ts | 29 +++++++++---- src/locales/de/translation.json | 14 +++++- src/locales/en/translation.json | 16 ++++++- src/locales/pt-BR/translation.json | 14 +++++- src/locales/zh/translation.json | 14 +++++- .../DragIndicator.tsx | 0 .../FileManager.tsx | 0 .../FileManagerContextMenu.tsx | 0 .../FileManagerGrid.tsx | 0 .../FileManagerSidebar.tsx | 0 .../components/DiffViewer.tsx | 0 .../components/DiffWindow.tsx | 0 .../components/DraggableWindow.tsx | 0 .../components/FileViewer.tsx | 0 .../components/FileWindow.tsx | 0 .../components/TerminalWindow.tsx | 0 .../components/WindowManager.tsx | 0 .../hooks/useDragAndDrop.ts | 0 .../hooks/useFileSelection.ts | 0 src/ui/desktop/apps/terminal/Terminal.tsx | 43 ++++++++++--------- ...shToolsSidebar.tsx => SSHToolsSidebar.tsx} | 2 +- src/ui/desktop/navigation/AppView.tsx | 2 +- src/ui/desktop/navigation/SSHAuthDialog.tsx | 2 +- src/ui/desktop/navigation/TopNavbar.tsx | 4 +- 27 files changed, 114 insertions(+), 48 deletions(-) rename src/ui/desktop/apps/{file manager => file-manager}/DragIndicator.tsx (100%) rename src/ui/desktop/apps/{file manager => file-manager}/FileManager.tsx (100%) rename src/ui/desktop/apps/{file manager => file-manager}/FileManagerContextMenu.tsx (100%) rename src/ui/desktop/apps/{file manager => file-manager}/FileManagerGrid.tsx (100%) rename src/ui/desktop/apps/{file manager => file-manager}/FileManagerSidebar.tsx (100%) rename src/ui/desktop/apps/{file manager => file-manager}/components/DiffViewer.tsx (100%) rename src/ui/desktop/apps/{file manager => file-manager}/components/DiffWindow.tsx (100%) rename src/ui/desktop/apps/{file manager => file-manager}/components/DraggableWindow.tsx (100%) rename src/ui/desktop/apps/{file manager => file-manager}/components/FileViewer.tsx (100%) rename src/ui/desktop/apps/{file manager => file-manager}/components/FileWindow.tsx (100%) rename src/ui/desktop/apps/{file manager => file-manager}/components/TerminalWindow.tsx (100%) rename src/ui/desktop/apps/{file manager => file-manager}/components/WindowManager.tsx (100%) rename src/ui/desktop/apps/{file manager => file-manager}/hooks/useDragAndDrop.ts (100%) rename src/ui/desktop/apps/{file manager => file-manager}/hooks/useFileSelection.ts (100%) rename src/ui/desktop/apps/tools/{SshToolsSidebar.tsx => SSHToolsSidebar.tsx} (99%) diff --git a/.github/workflows/electron.yml b/.github/workflows/electron.yml index 2c37767c..2bfa4355 100644 --- a/.github/workflows/electron.yml +++ b/.github/workflows/electron.yml @@ -403,7 +403,6 @@ jobs: - name: Build macOS DMG env: ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES: true - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} APPLE_ID: ${{ secrets.APPLE_ID }} APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} @@ -412,6 +411,7 @@ jobs: if [ "${{ steps.check_certs.outputs.has_certs }}" != "true" ]; then npm run build fi + export GH_TOKEN="${{ secrets.GITHUB_TOKEN }}" npx electron-builder --mac dmg --universal --x64 --arm64 --publish never - name: List release directory diff --git a/src/backend/database/routes/users.ts b/src/backend/database/routes/users.ts index 1e471111..9a3c69b3 100644 --- a/src/backend/database/routes/users.ts +++ b/src/backend/database/routes/users.ts @@ -1039,26 +1039,19 @@ router.post("/logout", authenticateJWT, async (req, res) => { // Route: Get current user's info using JWT // GET /users/me router.get("/me", authenticateJWT, async (req: Request, res: Response) => { - console.log("=== /users/me CALLED ==="); const userId = (req as AuthenticatedRequest).userId; - console.log("User ID from JWT:", userId); if (!isNonEmptyString(userId)) { - console.log("ERROR: Invalid userId"); authLogger.warn("Invalid userId in JWT for /users/me"); return res.status(401).json({ error: "Invalid userId" }); } try { const user = await db.select().from(users).where(eq(users.id, userId)); - console.log("User found:", user.length > 0 ? "YES" : "NO"); - if (!user || user.length === 0) { - console.log("ERROR: User not found in database"); authLogger.warn(`User not found for /users/me: ${userId}`); return res.status(401).json({ error: "User not found" }); } - console.log("SUCCESS: Returning user info"); res.json({ userId: user[0].id, username: user[0].username, @@ -1067,7 +1060,6 @@ router.get("/me", authenticateJWT, async (req: Request, res: Response) => { totp_enabled: !!user[0].totp_enabled, }); } catch (err) { - console.log("ERROR: Exception thrown:", err); authLogger.error("Failed to get username", err); res.status(500).json({ error: "Failed to get username" }); } diff --git a/src/backend/ssh/file-manager.ts b/src/backend/ssh/file-manager.ts index 349ddbaa..292d5224 100644 --- a/src/backend/ssh/file-manager.ts +++ b/src/backend/ssh/file-manager.ts @@ -459,6 +459,18 @@ app.post("/ssh/file_manager/ssh/connect", async (req, res) => { "The server does not support keyboard-interactive authentication. Please provide credentials.", reason: "no_keyboard", }); + } else if ( + resolvedCredentials.authType === "none" && + (err.message.includes("All configured authentication methods failed") || + err.message.includes("No supported authentication methods available") || + err.message.includes("authentication methods failed")) + ) { + res.status(200).json({ + status: "auth_required", + message: + "The server does not support keyboard-interactive authentication. Please provide credentials.", + reason: "no_keyboard", + }); } else { fileLogger.error("SSH connection failed for file manager", { operation: "file_connect", diff --git a/src/backend/ssh/terminal.ts b/src/backend/ssh/terminal.ts index f4be377c..3b986b53 100644 --- a/src/backend/ssh/terminal.ts +++ b/src/backend/ssh/terminal.ts @@ -485,6 +485,7 @@ wss.on("connection", async (ws: WebSocket, req) => { }, 60000); let resolvedCredentials = { password, key, keyPassword, keyType, authType }; + let authMethodNotAvailable = false; if (credentialId && id && hostConfig.userId) { try { const credentials = await SimpleDBOps.select( @@ -707,6 +708,23 @@ wss.on("connection", async (ws: WebSocket, req) => { sshConn.on("error", (err: Error) => { clearTimeout(connectionTimeout); + + if ( + (authMethodNotAvailable && resolvedCredentials.authType === "none") || + (resolvedCredentials.authType === "none" && + err.message.includes("All configured authentication methods failed")) + ) { + ws.send( + JSON.stringify({ + type: "auth_method_not_available", + message: + "The server does not support keyboard-interactive authentication. Please provide credentials.", + }), + ); + cleanupSSH(connectionTimeout); + return; + } + sshLogger.error("SSH connection error", err, { operation: "ssh_connect", hostId: id, @@ -880,7 +898,7 @@ wss.on("connection", async (ws: WebSocket, req) => { host: ip, port, username, - tryKeyboard: true, + tryKeyboard: resolvedCredentials.authType === "none", keepaliveInterval: 30000, keepaliveCountMax: 3, readyTimeout: 60000, @@ -955,14 +973,7 @@ wss.on("connection", async (ws: WebSocket, req) => { if (methodsLeft.includes("keyboard-interactive")) { callback("keyboard-interactive"); } else { - ws.send( - JSON.stringify({ - type: "auth_method_not_available", - message: - "The server does not support keyboard-interactive authentication. Please provide credentials.", - methodsAvailable: methodsLeft, - }), - ); + authMethodNotAvailable = true; callback(false); } } else { diff --git a/src/locales/de/translation.json b/src/locales/de/translation.json index 32198af9..35b10e00 100644 --- a/src/locales/de/translation.json +++ b/src/locales/de/translation.json @@ -311,6 +311,8 @@ "next": "Weiter", "previous": "Vorherige", "refresh": "Aktualisieren", + "connect": "Verbinden", + "connecting": "Verbinde...", "settings": "Einstellungen", "profile": "Profil", "help": "Hilfe", @@ -1173,7 +1175,17 @@ "passwordResetSuccess": "Erfolgreich!", "passwordResetSuccessDesc": "Ihr Passwort wurde erfolgreich zurückgesetzt! Sie können sich jetzt mit Ihrem neuen Passwort anmelden.", "signUp": "Registrierung", - "dataLossWarning": "Wenn Sie Ihr Passwort auf diese Weise zurücksetzen, werden alle Ihre gespeicherten SSH-Hosts, Anmeldeinformationen und andere verschlüsselte Daten gelöscht. Diese Aktion kann nicht rückgängig gemacht werden. Verwenden Sie diese Option nur, wenn Sie Ihr Passwort vergessen haben und nicht angemeldet sind." + "dataLossWarning": "Wenn Sie Ihr Passwort auf diese Weise zurücksetzen, werden alle Ihre gespeicherten SSH-Hosts, Anmeldeinformationen und andere verschlüsselte Daten gelöscht. Diese Aktion kann nicht rückgängig gemacht werden. Verwenden Sie diese Option nur, wenn Sie Ihr Passwort vergessen haben und nicht angemeldet sind.", + "sshAuthenticationRequired": "SSH-Authentifizierung erforderlich", + "sshNoKeyboardInteractive": "Keyboard-Interactive-Authentifizierung nicht verfügbar", + "sshAuthenticationFailed": "Authentifizierung fehlgeschlagen", + "sshAuthenticationTimeout": "Authentifizierungs-Timeout", + "sshNoKeyboardInteractiveDescription": "Der Server unterstützt keine Keyboard-Interactive-Authentifizierung. Bitte geben Sie Ihr Passwort oder Ihren SSH-Schlüssel ein.", + "sshAuthFailedDescription": "Die angegebenen Anmeldeinformationen waren falsch. Bitte versuchen Sie es erneut mit gültigen Anmeldeinformationen.", + "sshTimeoutDescription": "Der Authentifizierungsversuch ist abgelaufen. Bitte versuchen Sie es erneut.", + "sshProvideCredentialsDescription": "Bitte geben Sie Ihre SSH-Anmeldeinformationen ein, um eine Verbindung zu diesem Server herzustellen.", + "sshPasswordDescription": "Geben Sie das Passwort für diese SSH-Verbindung ein.", + "sshKeyPasswordDescription": "Wenn Ihr SSH-Schlüssel verschlüsselt ist, geben Sie hier die Passphrase ein." }, "errors": { "notFound": "Seite nicht gefunden", diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index d8838358..9c2085e1 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -54,7 +54,7 @@ "sshPrivateKey": "SSH Private Key", "upload": "Upload", "updateKey": "Update Key", - "keyPassword": "Key Password (optional)", + "keyPassword": "Key Password", "keyType": "Key Type", "keyTypeRSA": "RSA", "keyTypeECDSA": "ECDSA", @@ -287,6 +287,8 @@ "loading": "Loading", "required": "Required", "optional": "Optional", + "connect": "Connect", + "connecting": "Connecting...", "clear": "Clear", "toggleSidebar": "Toggle Sidebar", "sidebar": "Sidebar", @@ -778,7 +780,7 @@ "terminalCustomizationNotice": "Note: Terminal customizations only work on desktop (website and Electron app). Mobile apps and mobile website use system default terminal settings.", "noneAuthTitle": "Keyboard-Interactive Authentication", "noneAuthDescription": "This authentication method will use keyboard-interactive authentication when connecting to the SSH server.", - "noneAuthDetails": "Keyboard-interactive authentication allows the server to prompt you for credentials during connection. This is useful for servers that require multi-factor authentication or dynamic password entry." + "noneAuthDetails": "Keyboard-interactive authentication allows the server to prompt you for credentials during connection. This is useful for servers that require multi-factor authentication or if you do not want to save credentials locally." }, "terminal": { "title": "Terminal", @@ -1275,6 +1277,16 @@ "yourBackupCodes": "Your Backup Codes", "download": "Download", "setupTwoFactorTitle": "Set Up Two-Factor Authentication", + "sshAuthenticationRequired": "SSH Authentication Required", + "sshNoKeyboardInteractive": "Keyboard-Interactive Authentication Unavailable", + "sshAuthenticationFailed": "Authentication Failed", + "sshAuthenticationTimeout": "Authentication Timeout", + "sshNoKeyboardInteractiveDescription": "The server does not support keyboard-interactive authentication. Please provide your password or SSH key.", + "sshAuthFailedDescription": "The provided credentials were incorrect. Please try again with valid credentials.", + "sshTimeoutDescription": "The authentication attempt timed out. Please try again.", + "sshProvideCredentialsDescription": "Please provide your SSH credentials to connect to this server.", + "sshPasswordDescription": "Enter the password for this SSH connection.", + "sshKeyPasswordDescription": "If your SSH key is encrypted, enter the passphrase here.", "step1ScanQR": "Step 1: Scan the QR code with your authenticator app", "manualEntryCode": "Manual Entry Code", "cannotScanQRText": "If you can't scan the QR code, enter this code manually in your authenticator app", diff --git a/src/locales/pt-BR/translation.json b/src/locales/pt-BR/translation.json index 55570712..9d69f483 100644 --- a/src/locales/pt-BR/translation.json +++ b/src/locales/pt-BR/translation.json @@ -326,6 +326,8 @@ "next": "Próximo", "previous": "Anterior", "refresh": "Atualizar", + "connect": "Conectar", + "connecting": "Conectando...", "settings": "Configurações", "profile": "Perfil", "help": "Ajuda", @@ -1220,7 +1222,17 @@ "enterNewPassword": "Digite sua nova senha para o usuário:", "passwordResetSuccess": "Sucesso!", "signUp": "Cadastrar", - "dataLossWarning": "Redefinir sua senha desta forma excluirá todos os seus hosts SSH salvos, credenciais e outros dados criptografados. Esta ação não pode ser desfeita. Use isso apenas se você esqueceu sua senha e não está logado." + "dataLossWarning": "Redefinir sua senha desta forma excluirá todos os seus hosts SSH salvos, credenciais e outros dados criptografados. Esta ação não pode ser desfeita. Use isso apenas se você esqueceu sua senha e não está logado.", + "sshAuthenticationRequired": "Autenticação SSH Necessária", + "sshNoKeyboardInteractive": "Autenticação Interativa por Teclado Indisponível", + "sshAuthenticationFailed": "Falha na Autenticação", + "sshAuthenticationTimeout": "Tempo Limite de Autenticação", + "sshNoKeyboardInteractiveDescription": "O servidor não suporta autenticação interativa por teclado. Por favor, forneça sua senha ou chave SSH.", + "sshAuthFailedDescription": "As credenciais fornecidas estavam incorretas. Por favor, tente novamente com credenciais válidas.", + "sshTimeoutDescription": "A tentativa de autenticação expirou. Por favor, tente novamente.", + "sshProvideCredentialsDescription": "Por favor, forneça suas credenciais SSH para conectar a este servidor.", + "sshPasswordDescription": "Digite a senha para esta conexão SSH.", + "sshKeyPasswordDescription": "Se sua chave SSH estiver criptografada, digite a senha aqui." }, "errors": { "notFound": "Página não encontrada", diff --git a/src/locales/zh/translation.json b/src/locales/zh/translation.json index 69928ee1..81541787 100644 --- a/src/locales/zh/translation.json +++ b/src/locales/zh/translation.json @@ -345,6 +345,8 @@ "settingUp": "设置中...", "next": "下一步", "previous": "上一步", + "connect": "连接", + "connecting": "连接中...", "refresh": "刷新", "settings": "设置", "profile": "个人资料", @@ -1280,7 +1282,17 @@ "passwordResetSuccess": "成功!", "passwordResetSuccessDesc": "您的密码已成功重置!您现在可以使用新密码登录。", "signUp": "注册", - "dataLossWarning": "以这种方式重置密码将删除所有已保存的 SSH 主机、凭据和其他加密数据。此操作无法撤销。仅当您忘记密码且未登录时才使用此功能。" + "dataLossWarning": "以这种方式重置密码将删除所有已保存的 SSH 主机、凭据和其他加密数据。此操作无法撤销。仅当您忘记密码且未登录时才使用此功能。", + "sshAuthenticationRequired": "需要 SSH 身份验证", + "sshNoKeyboardInteractive": "键盘交互式身份验证不可用", + "sshAuthenticationFailed": "身份验证失败", + "sshAuthenticationTimeout": "身份验证超时", + "sshNoKeyboardInteractiveDescription": "服务器不支持键盘交互式身份验证。请提供您的密码或 SSH 密钥。", + "sshAuthFailedDescription": "提供的凭据不正确。请使用有效凭据重试。", + "sshTimeoutDescription": "身份验证尝试超时。请重试。", + "sshProvideCredentialsDescription": "请提供您的 SSH 凭据以连接到此服务器。", + "sshPasswordDescription": "输入此 SSH 连接的密码。", + "sshKeyPasswordDescription": "如果您的 SSH 密钥已加密,请在此处输入密码。" }, "errors": { "notFound": "页面未找到", diff --git a/src/ui/desktop/apps/file manager/DragIndicator.tsx b/src/ui/desktop/apps/file-manager/DragIndicator.tsx similarity index 100% rename from src/ui/desktop/apps/file manager/DragIndicator.tsx rename to src/ui/desktop/apps/file-manager/DragIndicator.tsx diff --git a/src/ui/desktop/apps/file manager/FileManager.tsx b/src/ui/desktop/apps/file-manager/FileManager.tsx similarity index 100% rename from src/ui/desktop/apps/file manager/FileManager.tsx rename to src/ui/desktop/apps/file-manager/FileManager.tsx diff --git a/src/ui/desktop/apps/file manager/FileManagerContextMenu.tsx b/src/ui/desktop/apps/file-manager/FileManagerContextMenu.tsx similarity index 100% rename from src/ui/desktop/apps/file manager/FileManagerContextMenu.tsx rename to src/ui/desktop/apps/file-manager/FileManagerContextMenu.tsx diff --git a/src/ui/desktop/apps/file manager/FileManagerGrid.tsx b/src/ui/desktop/apps/file-manager/FileManagerGrid.tsx similarity index 100% rename from src/ui/desktop/apps/file manager/FileManagerGrid.tsx rename to src/ui/desktop/apps/file-manager/FileManagerGrid.tsx diff --git a/src/ui/desktop/apps/file manager/FileManagerSidebar.tsx b/src/ui/desktop/apps/file-manager/FileManagerSidebar.tsx similarity index 100% rename from src/ui/desktop/apps/file manager/FileManagerSidebar.tsx rename to src/ui/desktop/apps/file-manager/FileManagerSidebar.tsx diff --git a/src/ui/desktop/apps/file manager/components/DiffViewer.tsx b/src/ui/desktop/apps/file-manager/components/DiffViewer.tsx similarity index 100% rename from src/ui/desktop/apps/file manager/components/DiffViewer.tsx rename to src/ui/desktop/apps/file-manager/components/DiffViewer.tsx diff --git a/src/ui/desktop/apps/file manager/components/DiffWindow.tsx b/src/ui/desktop/apps/file-manager/components/DiffWindow.tsx similarity index 100% rename from src/ui/desktop/apps/file manager/components/DiffWindow.tsx rename to src/ui/desktop/apps/file-manager/components/DiffWindow.tsx diff --git a/src/ui/desktop/apps/file manager/components/DraggableWindow.tsx b/src/ui/desktop/apps/file-manager/components/DraggableWindow.tsx similarity index 100% rename from src/ui/desktop/apps/file manager/components/DraggableWindow.tsx rename to src/ui/desktop/apps/file-manager/components/DraggableWindow.tsx diff --git a/src/ui/desktop/apps/file manager/components/FileViewer.tsx b/src/ui/desktop/apps/file-manager/components/FileViewer.tsx similarity index 100% rename from src/ui/desktop/apps/file manager/components/FileViewer.tsx rename to src/ui/desktop/apps/file-manager/components/FileViewer.tsx diff --git a/src/ui/desktop/apps/file manager/components/FileWindow.tsx b/src/ui/desktop/apps/file-manager/components/FileWindow.tsx similarity index 100% rename from src/ui/desktop/apps/file manager/components/FileWindow.tsx rename to src/ui/desktop/apps/file-manager/components/FileWindow.tsx diff --git a/src/ui/desktop/apps/file manager/components/TerminalWindow.tsx b/src/ui/desktop/apps/file-manager/components/TerminalWindow.tsx similarity index 100% rename from src/ui/desktop/apps/file manager/components/TerminalWindow.tsx rename to src/ui/desktop/apps/file-manager/components/TerminalWindow.tsx diff --git a/src/ui/desktop/apps/file manager/components/WindowManager.tsx b/src/ui/desktop/apps/file-manager/components/WindowManager.tsx similarity index 100% rename from src/ui/desktop/apps/file manager/components/WindowManager.tsx rename to src/ui/desktop/apps/file-manager/components/WindowManager.tsx diff --git a/src/ui/desktop/apps/file manager/hooks/useDragAndDrop.ts b/src/ui/desktop/apps/file-manager/hooks/useDragAndDrop.ts similarity index 100% rename from src/ui/desktop/apps/file manager/hooks/useDragAndDrop.ts rename to src/ui/desktop/apps/file-manager/hooks/useDragAndDrop.ts diff --git a/src/ui/desktop/apps/file manager/hooks/useFileSelection.ts b/src/ui/desktop/apps/file-manager/hooks/useFileSelection.ts similarity index 100% rename from src/ui/desktop/apps/file manager/hooks/useFileSelection.ts rename to src/ui/desktop/apps/file-manager/hooks/useFileSelection.ts diff --git a/src/ui/desktop/apps/terminal/Terminal.tsx b/src/ui/desktop/apps/terminal/Terminal.tsx index 9ad4b9a6..f0d90b09 100644 --- a/src/ui/desktop/apps/terminal/Terminal.tsx +++ b/src/ui/desktop/apps/terminal/Terminal.tsx @@ -250,6 +250,9 @@ export const Terminal = forwardRef( data: { cols: terminal.cols, rows: terminal.rows, + password: credentials.password, + sshKey: credentials.sshKey, + keyPassword: credentials.keyPassword, hostConfig: { ...hostConfig, password: credentials.password, @@ -525,26 +528,6 @@ export const Terminal = forwardRef( } else if (msg.type === "error") { const errorMessage = msg.message || t("terminal.unknownError"); - if ( - errorMessage.toLowerCase().includes("auth") || - errorMessage.toLowerCase().includes("password") || - errorMessage.toLowerCase().includes("permission") || - errorMessage.toLowerCase().includes("denied") || - errorMessage.toLowerCase().includes("invalid") || - errorMessage.toLowerCase().includes("failed") || - errorMessage.toLowerCase().includes("incorrect") - ) { - toast.error(t("terminal.authError", { message: errorMessage })); - shouldNotReconnectRef.current = true; - if (webSocketRef.current) { - webSocketRef.current.close(); - } - if (onClose) { - onClose(); - } - return; - } - if ( errorMessage.toLowerCase().includes("connection") || errorMessage.toLowerCase().includes("timeout") || @@ -563,6 +546,26 @@ export const Terminal = forwardRef( return; } + if ( + (errorMessage.toLowerCase().includes("auth") && + errorMessage.toLowerCase().includes("failed")) || + errorMessage.toLowerCase().includes("permission denied") || + (errorMessage.toLowerCase().includes("invalid") && + (errorMessage.toLowerCase().includes("password") || + errorMessage.toLowerCase().includes("key"))) || + errorMessage.toLowerCase().includes("incorrect password") + ) { + toast.error(t("terminal.authError", { message: errorMessage })); + shouldNotReconnectRef.current = true; + if (webSocketRef.current) { + webSocketRef.current.close(); + } + if (onClose) { + onClose(); + } + return; + } + toast.error(t("terminal.error", { message: errorMessage })); } else if (msg.type === "connected") { setIsConnected(true); diff --git a/src/ui/desktop/apps/tools/SshToolsSidebar.tsx b/src/ui/desktop/apps/tools/SSHToolsSidebar.tsx similarity index 99% rename from src/ui/desktop/apps/tools/SshToolsSidebar.tsx rename to src/ui/desktop/apps/tools/SSHToolsSidebar.tsx index 8949e6cf..2317434f 100644 --- a/src/ui/desktop/apps/tools/SshToolsSidebar.tsx +++ b/src/ui/desktop/apps/tools/SSHToolsSidebar.tsx @@ -25,7 +25,7 @@ interface SshToolsSidebarProps { onClose: () => void; } -export function SshToolsSidebar({ +export function SSHToolsSidebar({ isOpen, onClose, }: SshToolsSidebarProps): React.ReactElement | null { diff --git a/src/ui/desktop/navigation/AppView.tsx b/src/ui/desktop/navigation/AppView.tsx index 893d6e35..6efed744 100644 --- a/src/ui/desktop/navigation/AppView.tsx +++ b/src/ui/desktop/navigation/AppView.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useRef, useState, useMemo } from "react"; import { Terminal } from "@/ui/desktop/apps/terminal/Terminal.tsx"; import { Server as ServerView } from "@/ui/desktop/apps/server/Server.tsx"; -import { FileManager } from "@/ui/desktop/apps/file manager/FileManager.tsx"; +import { FileManager } from "@/ui/desktop/apps/file-manager/FileManager.tsx"; import { useTabs } from "@/ui/desktop/navigation/tabs/TabContext.tsx"; import { ResizablePanelGroup, diff --git a/src/ui/desktop/navigation/SSHAuthDialog.tsx b/src/ui/desktop/navigation/SSHAuthDialog.tsx index 76311989..35e4094b 100644 --- a/src/ui/desktop/navigation/SSHAuthDialog.tsx +++ b/src/ui/desktop/navigation/SSHAuthDialog.tsx @@ -137,7 +137,7 @@ export function SSHAuthDialog({ return (
diff --git a/src/ui/desktop/navigation/TopNavbar.tsx b/src/ui/desktop/navigation/TopNavbar.tsx index 8ffd6107..7d7ad169 100644 --- a/src/ui/desktop/navigation/TopNavbar.tsx +++ b/src/ui/desktop/navigation/TopNavbar.tsx @@ -8,7 +8,7 @@ import { useTabs } from "@/ui/desktop/navigation/tabs/TabContext.tsx"; import { useTranslation } from "react-i18next"; import { TabDropdown } from "@/ui/desktop/navigation/tabs/TabDropdown.tsx"; import { SnippetsSidebar } from "@/ui/desktop/apps/terminal/SnippetsSidebar.tsx"; -import { SshToolsSidebar } from "@/ui/desktop/apps/tools/SshToolsSidebar.tsx"; +import { SSHToolsSidebar } from "@/ui/desktop/apps/tools/SSHToolsSidebar.tsx"; import { ToolsMenu } from "@/ui/desktop/apps/tools/ToolsMenu.tsx"; interface TabData { @@ -497,7 +497,7 @@ export function TopNavbar({
)} - setToolsSheetOpen(false)} />