From bdaea68d202b2fc2d1f0ea9daa431819ce1f5656 Mon Sep 17 00:00:00 2001 From: Baobhan Sith <80159437+Heavrnl@users.noreply.github.com> Date: Sat, 10 May 2025 09:56:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/FocusSwitcherConfigurator.vue | 2 +- packages/frontend/src/locales/en-US.json | 26 ++++++++++++++++ packages/frontend/src/locales/ja-JP.json | 30 +++++++++++++++++++ packages/frontend/src/locales/zh-CN.json | 26 ++++++++++++++++ .../session/actions/sshSuspendActions.ts | 9 ++++-- .../src/views/SuspendedSshSessionsView.vue | 8 ++--- 6 files changed, 94 insertions(+), 7 deletions(-) diff --git a/packages/frontend/src/components/FocusSwitcherConfigurator.vue b/packages/frontend/src/components/FocusSwitcherConfigurator.vue index 7c96026..f614f19 100644 --- a/packages/frontend/src/components/FocusSwitcherConfigurator.vue +++ b/packages/frontend/src/components/FocusSwitcherConfigurator.vue @@ -283,7 +283,7 @@ const localAvailableInputs = computed(() => {

{{ t('focusSwitcher.shortcutSettings', '快捷键设置') }}

-
+
{{ input.label }} s.suspendSessionId === payload.suspendSessionId); + if (resumedSessionIndex !== -1) { + suspendedSshSessions.value.splice(resumedSessionIndex, 1); + console.log(`[${t('term.sshSuspend')}] Successfully resumed and removed session ${payload.suspendSessionId} from the frontend list.`); + } + // 可选:fetchSuspendedSshSessions(); // 如果仍然需要与后端同步最新列表,可以保留,但即时性由上面的 splice 保证 } else { uiNotificationsStore.addNotification({ type: 'error', diff --git a/packages/frontend/src/views/SuspendedSshSessionsView.vue b/packages/frontend/src/views/SuspendedSshSessionsView.vue index e453907..abbdb0d 100644 --- a/packages/frontend/src/views/SuspendedSshSessionsView.vue +++ b/packages/frontend/src/views/SuspendedSshSessionsView.vue @@ -9,7 +9,7 @@ type="text" v-model="searchTerm" :placeholder="$t('suspendedSshSessions.searchPlaceholder')" - class="w-full pl-10 pr-4 py-2 border border-border rounded-md bg-input text-foreground focus:outline-none focus:ring-1 focus:ring-primary focus:border-primary" + class="w-full pl-10 pr-4 py-1.5 border border-border/50 rounded-lg bg-input text-foreground text-sm shadow-sm focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary transition duration-150 ease-in-out" @input="filterSessions" />
@@ -31,7 +31,7 @@
  • @@ -86,7 +86,7 @@ :title="$t('suspendedSshSessions.action.resume')" class="px-3 py-1.5 text-sm font-medium rounded-md text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500 transition-colors duration-150 inline-flex items-center" > - + {{ $t('suspendedSshSessions.action.resume') }}