From d0827c3b0c49b84f534cf4c293e7fc0dc23ab16f Mon Sep 17 00:00:00 2001 From: hstyi Date: Tue, 1 Jul 2025 10:44:41 +0800 Subject: [PATCH] chore: improve connect-with --- src/main/kotlin/app/termora/tree/NewHostTree.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/app/termora/tree/NewHostTree.kt b/src/main/kotlin/app/termora/tree/NewHostTree.kt index 95aba0f..e64fc54 100644 --- a/src/main/kotlin/app/termora/tree/NewHostTree.kt +++ b/src/main/kotlin/app/termora/tree/NewHostTree.kt @@ -332,8 +332,8 @@ class NewHostTree : SimpleTree(), Disposable { importMenu.isEnabled = lastNode.isFolder // 如果选中了 SSH 服务器,那么才启用 - openWithSFTP.isEnabled = fullNodes.map { it.host }.any { it.protocol == SSHProtocolProvider.PROTOCOL } - openWithSFTPCommand.isEnabled = openWithSFTP.isEnabled + openWithSFTP.isEnabled = fullNodes.map { it.host }.any { TransferProtocolProvider.valueOf(it.protocol) != null } + openWithSFTPCommand.isEnabled = fullNodes.map { it.host }.any { it.protocol == SSHProtocolProvider.PROTOCOL } openWith.isEnabled = openWith.menuComponents.any { it is JMenuItem && it.isEnabled }