This commit is contained in:
Baobhan Sith
2025-05-16 22:49:07 +08:00
parent 084cc570f4
commit 56833d58e1
23 changed files with 89 additions and 194 deletions
@@ -365,8 +365,7 @@ export function useFileManagerDragAndDrop(options: UseFileManagerDragAndDropOpti
// --- 返回状态和处理函数 ---
return {
// isDraggingOver, // 不再导出
showExternalDropOverlay, // 新增导出
showExternalDropOverlay,
dragOverTarget,
draggedItem, // 需要暴露以供 handleDragOverRow 等函数内部判断
// --- 事件处理器 ---
@@ -374,7 +373,7 @@ export function useFileManagerDragAndDrop(options: UseFileManagerDragAndDropOpti
handleDragOver,
handleDragLeave,
handleDrop, // 容器的 drop (主要用于清理)
handleOverlayDrop, // 新增导出:蒙版的 drop
handleOverlayDrop,
handleDragStart,
handleDragEnd,
handleDragOverRow,
@@ -38,20 +38,20 @@ export function useAddConnectionForm(props: AddConnectionFormProps, emit: AddCon
// 表单数据模型
const initialFormData = {
type: 'SSH' as 'SSH' | 'RDP' | 'VNC', // Use uppercase to match ConnectionInfo
type: 'SSH' as 'SSH' | 'RDP' | 'VNC',
name: '',
host: '',
port: 22,
username: '',
auth_method: 'password' as 'password' | 'key', // SSH specific
auth_method: 'password' as 'password' | 'key',
password: '',
private_key: '', // SSH specific (for direct input) - This field seems unused in the new logic, but kept for initialData consistency
passphrase: '', // SSH specific (for direct input) - This field seems unused, kept for consistency
selected_ssh_key_id: null as number | null, // +++ Add field for selected key ID +++
private_key: '',
passphrase: '',
selected_ssh_key_id: null as number | null,
proxy_id: null as number | null,
tag_ids: [] as number[], // 新增 tag_ids 字段
notes: '', // 新增备注字段
vncPassword: '', // VNC specific password
tag_ids: [] as number[],
notes: '',
vncPassword: '',
};
const formData = reactive({ ...initialFormData });
@@ -86,7 +86,6 @@ export function createSshTerminalManager(sessionId: string, wsDeps: SshTerminalD
};
const handleTerminalResize = (dimensions: { cols: number; rows: number }) => {
// 添加日志,确认从 WorkspaceView 收到的尺寸
console.log(`[SSH ${sessionId}] handleTerminalResize called with:`, dimensions);
// 只有在连接状态下才发送 resize 命令给后端
if (isConnected.value) {