feat: 优化样式

This commit is contained in:
Baobhan Sith
2025-05-10 09:56:38 +08:00
parent 05747a46e1
commit bdaea68d20
6 changed files with 94 additions and 7 deletions
@@ -492,8 +492,13 @@ const handleSshSuspendResumedNotif = async (payload: SshSuspendResumedNotifPaylo
message: t('sshSuspend.notifications.resumeErrorGeneric', { error: String(error) }),
});
}
// 成功恢复后,挂起列表中移除 (或者等 SSH_SUSPEND_ENTRY_REMOVED_RESP)
fetchSuspendedSshSessions(); // 在这里主动刷新一次,确保列表更新
// 成功恢复后,立即从前端挂起列表中移除
const resumedSessionIndex = suspendedSshSessions.value.findIndex(s => 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',