feat: v0.3.0 版本 - SSH终端、SFTP、端口转发功能实现
核心功能: - SSH终端: 密码/密钥认证、XTerm.js终端、多主题配色、IP高亮 - SFTP管理: 双栏文件管理、上传下载、传输队列 - 端口转发: 本地/远程转发、SOCKS5动态代理、规则管理 架构改进: - 拆分大型组件 (SFTPView/TabBar/Sidebar) - 添加统一日志和错误处理 - 修复React严格模式下的终端黑屏问题 UI更新: - 新增端口转发视图 - 更新UI预览文档 - 左侧栏右键菜单支持SFTP快捷打开
This commit is contained in:
1 parent
cf1c054381
commit
484d850abd
105 files changed
+25330
-64
No files matched your search
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* SFTP Types - 统一的 SFTP 类型定义
|
||||
* 在主进程和渲染进程间共享
|
||||
*/
|
||||
|
||||
// 文件项
|
||||
export interface FileItem {
|
||||
name: string
|
||||
path: string
|
||||
type: 'file' | 'directory' | 'symlink'
|
||||
size: number
|
||||
modified: number // Unix timestamp
|
||||
permissions: string
|
||||
}
|
||||
|
||||
// 传输任务
|
||||
export interface TransferTask {
|
||||
id: string
|
||||
type: 'upload' | 'download'
|
||||
fileName: string
|
||||
filePath: string
|
||||
status: 'pending' | 'transferring' | 'completed' | 'failed' | 'canceled'
|
||||
progress: number
|
||||
error?: string
|
||||
total: number
|
||||
transferred: number
|
||||
speed?: number // bytes per second
|
||||
startTime?: number
|
||||
}
|
||||
|
||||
// 传输进度
|
||||
export interface TransferProgress {
|
||||
taskId: string
|
||||
transferred: number
|
||||
total: number
|
||||
speed: number
|
||||
}
|
||||
|
||||
// 文件列表排序
|
||||
export type SortField = 'name' | 'size' | 'modified' | 'type'
|
||||
export type SortOrder = 'asc' | 'desc'
|
||||
|
||||
// SFTP 操作结果
|
||||
export interface SFTPOperationResult {
|
||||
success: boolean
|
||||
error?: string
|
||||
}
|
||||
Reference in new issue
Block a user