From e886d13ed37e36db2f1c1b6da1d1e6025eb1cd98 Mon Sep 17 00:00:00 2001
From: Baobhan Sith <80159437+Heavrnl@users.noreply.github.com>
Date: Tue, 13 May 2025 08:47:42 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0"=E5=BC=B9=E5=87=BA?=
=?UTF-8?q?=E6=96=87=E4=BB=B6=E7=AE=A1=E7=90=86=E5=99=A8=E7=AA=97=E5=8F=A3?=
=?UTF-8?q?"=E8=AE=BE=E7=BD=AE=E9=A1=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/settings/settings.controller.ts | 1 +
.../src/components/CommandInputBar.vue | 23 ++++++++++++-
.../settings/WorkspaceSettingsSection.vue | 26 +++++++++++++++
.../composables/settings/useSystemSettings.ts | 1 -
.../settings/useWorkspaceSettings.ts | 33 +++++++++++++++++++
.../src/composables/workspaceEvents.ts | 1 +
packages/frontend/src/locales/en-US.json | 12 +++++++
packages/frontend/src/locales/ja-JP.json | 12 +++++++
packages/frontend/src/locales/zh-CN.json | 12 +++++++
.../frontend/src/stores/settings.store.ts | 17 ++++++++--
10 files changed, 133 insertions(+), 5 deletions(-)
diff --git a/packages/backend/src/settings/settings.controller.ts b/packages/backend/src/settings/settings.controller.ts
index 8107242..658a6c0 100644
--- a/packages/backend/src/settings/settings.controller.ts
+++ b/packages/backend/src/settings/settings.controller.ts
@@ -41,6 +41,7 @@ export const settingsController = {
'autoCopyOnSelect', 'dockerStatusIntervalSeconds', 'dockerDefaultExpand',
'statusMonitorIntervalSeconds', // +++ 添加状态监控间隔键 +++
'workspaceSidebarPersistent', // +++ 添加侧边栏固定键 +++
+ 'showPopupFileManager', // +++ 添加弹窗文件管理器设置键 +++
'sidebarPaneWidths', // +++ 添加侧边栏宽度对象键 +++
'fileManagerRowSizeMultiplier', // +++ 添加文件管理器行大小键 +++
'fileManagerColWidths', // +++ 添加文件管理器列宽键 +++
diff --git a/packages/frontend/src/components/CommandInputBar.vue b/packages/frontend/src/components/CommandInputBar.vue
index 2d60782..1e71de0 100644
--- a/packages/frontend/src/components/CommandInputBar.vue
+++ b/packages/frontend/src/components/CommandInputBar.vue
@@ -25,7 +25,7 @@ const commandHistoryStore = useCommandHistoryStore();
const sessionStore = useSessionStore(); // +++ 初始化 Session Store +++
// Get reactive setting from store
-const { commandInputSyncTarget } = storeToRefs(settingsStore);
+const { commandInputSyncTarget, showPopupFileManagerBoolean } = storeToRefs(settingsStore); // +++ Import showPopupFileManagerBoolean +++
// Get reactive state and actions from quick commands store
const { selectedIndex: quickCommandsSelectedIndex, flatVisibleCommands: quickCommandsFiltered } = storeToRefs(quickCommandsStore);
const { resetSelection: resetQuickCommandsSelection } = quickCommandsStore;
@@ -298,6 +298,17 @@ const closeSuspendedSshSessionsModal = () => {
showSuspendedSshSessionsModal.value = false;
};
+// +++ Function to request opening the file manager modal via event bus +++
+const openFileManagerModal = () => {
+ if (activeSessionId.value) {
+ console.log(`[CommandInputBar] Emitting fileManager:openModalRequest for session: ${activeSessionId.value}`);
+ emitWorkspaceEvent('fileManager:openModalRequest', { sessionId: activeSessionId.value });
+ } else {
+ console.warn('[CommandInputBar] Cannot open file manager modal: No active session ID.');
+ // Optionally, show a notification to the user
+ }
+};
+
// +++ Handler for command execution from the modal +++
const handleQuickCommandExecute = (command: string) => {
console.log(`[CommandInputBar] Executing quick command: ${command}`);
@@ -400,6 +411,15 @@ const handleQuickCommandExecute = (command: string) => {
+
+
@@ -434,6 +454,7 @@ const handleQuickCommandExecute = (command: string) => {
:is-visible="showSuspendedSshSessionsModal"
@close="closeSuspendedSshSessionsModal"
/>
+