v1.9.27: add disconnect button in terminal + disconnect in context menu
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -111,6 +111,7 @@ _EN = {
|
||||
"term_connecting": "Connecting to {alias}...",
|
||||
"term_connected": "Connected to {alias}",
|
||||
"term_disconnected": "Disconnected",
|
||||
"ctx_disconnect": "Disconnect",
|
||||
"term_click_to_connect": "Double-click to connect to {alias}",
|
||||
"sftp_click_to_connect": "Double-click server to browse files",
|
||||
"term_reconnecting": "Reconnecting ({n}/{max})...",
|
||||
@@ -636,6 +637,7 @@ _RU = {
|
||||
"term_connecting": "Подключение к {alias}...",
|
||||
"term_connected": "Подключено к {alias}",
|
||||
"term_disconnected": "Отключено",
|
||||
"ctx_disconnect": "Отключиться",
|
||||
"term_click_to_connect": "Двойной клик для подключения к {alias}",
|
||||
"sftp_click_to_connect": "Двойной клик для просмотра файлов",
|
||||
"term_reconnecting": "Переподключение ({n}/{max})...",
|
||||
@@ -1161,6 +1163,7 @@ _ZH = {
|
||||
"term_connecting": "正在连接 {alias}...",
|
||||
"term_connected": "已连接到 {alias}",
|
||||
"term_disconnected": "已断开",
|
||||
"ctx_disconnect": "断开连接",
|
||||
"term_click_to_connect": "双击连接 {alias}",
|
||||
"sftp_click_to_connect": "双击服务器浏览文件",
|
||||
"term_reconnecting": "重新连接中 ({n}/{max})...",
|
||||
|
||||
@@ -210,6 +210,7 @@ CTX_ICONS = {
|
||||
"ctx_open_browser": "browser",
|
||||
"ctx_check_status": "status_check",
|
||||
"ctx_copy_alias": "copy",
|
||||
"ctx_disconnect": "close",
|
||||
"edit": "edit",
|
||||
"delete": "delete",
|
||||
}
|
||||
|
||||
@@ -255,4 +255,14 @@ class SessionPool:
|
||||
)
|
||||
if has_active:
|
||||
active.append(alias)
|
||||
return active
|
||||
return active
|
||||
|
||||
def has_active_session(self, alias: str) -> bool:
|
||||
with self._lock:
|
||||
sd = self._sessions.get(alias)
|
||||
if not sd:
|
||||
return False
|
||||
return bool(
|
||||
(sd.shell_session and sd.shell_session.connected) or
|
||||
(sd.sftp_session and sd.sftp_session.connected)
|
||||
)
|
||||
Reference in New Issue
Block a user