Add context menus and SFTP transfer progress handling

- Implemented context menu styles in components.css.
- Added SFTP transfer progress queue and related styles in sftp.css.
- Enhanced app.js to handle SFTP transfer progress events.
- Updated sftp.js to manage transfer progress and render the transfer queue.
- Modified terminal.js to include context menu shortcuts.
- Adjusted manager.go to emit SFTP transfer progress events with direction.
- Updated sshclient.go to modify terminal modes for better performance.
This commit is contained in:
Andy Dixon
2026-05-21 11:28:37 +01:00
parent 23aaa1b53e
commit 96c603f3f4
7 changed files with 288 additions and 3 deletions
+3
View File
@@ -1069,6 +1069,7 @@ func (m *Manager) SFTPDownload(sessionID, remotePath, localPath string) error {
return sc.Download(remotePath, localPath, func(p sftpclient.TransferProgress) {
m.emitEvent("session:sftp:progress", map[string]interface{}{
"sessionID": sessionID,
"direction": "download",
"transferred": p.Transferred,
"total": p.Total,
"path": p.Path,
@@ -1086,6 +1087,7 @@ func (m *Manager) SFTPUpload(sessionID, localPath, remotePath string) error {
return sc.Upload(localPath, remotePath, func(p sftpclient.TransferProgress) {
m.emitEvent("session:sftp:progress", map[string]interface{}{
"sessionID": sessionID,
"direction": "upload",
"transferred": p.Transferred,
"total": p.Total,
"path": p.Path,
@@ -1103,6 +1105,7 @@ func (m *Manager) SFTPUploadBytes(sessionID, remotePath string, data []byte) err
return sc.UploadBytes(remotePath, data, func(p sftpclient.TransferProgress) {
m.emitEvent("session:sftp:progress", map[string]interface{}{
"sessionID": sessionID,
"direction": "upload",
"transferred": p.Transferred,
"total": p.Total,
"path": p.Path,