From 1eb1efde7227c42f1fe3a91510a561341558d44a Mon Sep 17 00:00:00 2001 From: Baobhan Sith <80159437+Heavrnl@users.noreply.github.com> Date: Sun, 11 May 2025 09:59:32 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=BA=E5=BF=AB=E6=8D=B7=E6=8C=87?= =?UTF-8?q?=E4=BB=A4=E5=92=8C=E5=91=BD=E4=BB=A4=E5=8E=86=E5=8F=B2=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E2=80=9C=E5=8F=91=E9=80=81=E5=88=B0=E5=85=A8=E9=83=A8?= =?UTF-8?q?=E4=BC=9A=E8=AF=9D=E2=80=9D=E5=8F=B3=E9=94=AE=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs #28 --- packages/frontend/src/locales/en-US.json | 16 ++- packages/frontend/src/locales/ja-JP.json | 26 +++- packages/frontend/src/locales/zh-CN.json | 16 ++- .../frontend/src/views/CommandHistoryView.vue | 79 +++++++++++- .../frontend/src/views/QuickCommandsView.vue | 112 ++++++++++++++---- packages/frontend/src/views/WorkspaceView.vue | 35 +++--- 6 files changed, 236 insertions(+), 48 deletions(-) diff --git a/packages/frontend/src/locales/en-US.json b/packages/frontend/src/locales/en-US.json index 007d0e9..c1e9e71 100644 --- a/packages/frontend/src/locales/en-US.json +++ b/packages/frontend/src/locales/en-US.json @@ -1006,7 +1006,14 @@ "empty": "No history records", "confirmClear": "Are you sure you want to clear all history?", "copied": "Copied to clipboard", - "copyFailed": "Copy failed" + "copyFailed": "Copy failed", + "actions": { + "sendToAllSessions": "Send to All Sessions" + }, + "notifications": { + "sentToAllSessions": "Command sent to {count} sessions.", + "noActiveSshSessions": "No active SSH sessions to send command to." + } }, "quickCommands": { "searchPlaceholder": "Search name or command...", @@ -1032,6 +1039,13 @@ "untagged": "Untagged", "tags": { "clickToEditTag": "Click to edit tag name" + }, + "actions": { + "sendToAllSessions": "Send to All Sessions" + }, + "notifications": { + "sentToAllSessions": "Command sent to {count} sessions.", + "noActiveSshSessions": "No active SSH sessions to send command to." } }, "setup": { diff --git a/packages/frontend/src/locales/ja-JP.json b/packages/frontend/src/locales/ja-JP.json index 5a47852..e34c2f9 100644 --- a/packages/frontend/src/locales/ja-JP.json +++ b/packages/frontend/src/locales/ja-JP.json @@ -57,9 +57,16 @@ "delete": "削除", "empty": "履歴はありません", "loading": "ロード中...", - "searchPlaceholder": "履歴を検索..." - }, - "commandInputBar": { + "searchPlaceholder": "履歴を検索...", + "actions": { + "sendToAllSessions": "すべてのセッションに送信" + }, + "notifications": { + "sentToAllSessions": "コマンドは {count} 個のセッションに送信されました。", + "noActiveSshSessions": "コマンドを送信するアクティブな SSH セッションはありません。" + } + }, + "commandInputBar": { "closeSearch": "ターミナル検索を閉じる", "configureFocusSwitch": "フォーカススイッチャーを設定", "findNext": "次を検索", @@ -572,9 +579,16 @@ "searchPlaceholder": "名前またはコマンドを検索...", "sortByName": "名前", "sortByUsage": "使用頻度", - "usageCount": "使用回数" - }, - "remoteDesktopModal": { + "usageCount": "使用回数", + "actions": { + "sendToAllSessions": "すべてのセッションに送信" + }, + "notifications": { + "sentToAllSessions": "コマンドは {count} 個のセッションに送信されました。", + "noActiveSshSessions": "コマンドを送信するアクティブな SSH セッションはありません。" + } + }, + "remoteDesktopModal": { "errors": { "clientError": "クライアントエラー", "connectionFailed": "接続に失敗しました", diff --git a/packages/frontend/src/locales/zh-CN.json b/packages/frontend/src/locales/zh-CN.json index e1a1b5a..366ff94 100644 --- a/packages/frontend/src/locales/zh-CN.json +++ b/packages/frontend/src/locales/zh-CN.json @@ -1008,7 +1008,14 @@ "empty": "没有历史记录", "confirmClear": "确定要清空所有历史记录吗?", "copied": "已复制到剪贴板", - "copyFailed": "复制失败" + "copyFailed": "复制失败", + "actions": { + "sendToAllSessions": "发送到全部会话" + }, + "notifications": { + "sentToAllSessions": "指令已发送到 {count} 个会话。", + "noActiveSshSessions": "没有活动的 SSH 会话可发送指令。" + } }, "quickCommands": { "searchPlaceholder": "搜索名称或指令...", @@ -1034,6 +1041,13 @@ "untagged": "未标记", "tags": { "clickToEditTag": "点击编辑标签名称" + }, + "actions": { + "sendToAllSessions": "发送到全部会话" + }, + "notifications": { + "sentToAllSessions": "指令已发送到 {count} 个会话。", + "noActiveSshSessions": "没有活动的 SSH 会话可发送指令。" } }, "setup": { diff --git a/packages/frontend/src/views/CommandHistoryView.vue b/packages/frontend/src/views/CommandHistoryView.vue index 0a1d3f2..74005b0 100644 --- a/packages/frontend/src/views/CommandHistoryView.vue +++ b/packages/frontend/src/views/CommandHistoryView.vue @@ -40,6 +40,7 @@ class="group flex justify-between items-center px-3 py-2.5 mb-1 cursor-pointer rounded-md hover:bg-primary/10 transition-colors duration-150" :class="{ 'bg-primary/20 font-medium': index === storeSelectedIndex }" @click="executeCommand(entry.command)" + @contextmenu.prevent="showCommandHistoryContextMenu($event, entry)" :title="entry.command" > @@ -59,29 +60,57 @@ + + +
+ +
diff --git a/packages/frontend/src/views/QuickCommandsView.vue b/packages/frontend/src/views/QuickCommandsView.vue index 284fdee..372eca1 100644 --- a/packages/frontend/src/views/QuickCommandsView.vue +++ b/packages/frontend/src/views/QuickCommandsView.vue @@ -1,4 +1,4 @@ -