Fix SFTP panel to overlay terminal as a slide-out panel

Changed from flex-sibling layout (broken by absolute-positioned terminal
container) to an overlay approach: the SFTP panel is now position:absolute
on the right edge with a drop shadow, sliding over the terminal. The
resize handle is embedded inside the panel at its left edge.
This commit is contained in:
2026-04-16 00:00:00 +01:00
parent d5d0a5c27a
commit 2eb9406f05
2 changed files with 23 additions and 36 deletions
+2 -9
View File
@@ -101,6 +101,7 @@ class SFTPBrowser {
// Build the panel DOM
var panel = createElement('div', 'sftp-panel');
var handle = createElement('div', 'sftp-resize-handle');
panel.appendChild(handle);
state.el = panel;
state.handle = handle;
@@ -119,9 +120,7 @@ class SFTPBrowser {
this.panels.set(sessionId, state);
// Switch session panel to row layout and append
sessionPanel.classList.add('has-sftp');
sessionPanel.appendChild(handle);
// Append the overlay panel into the session panel
sessionPanel.appendChild(panel);
this._setupResize(sessionId, state);
@@ -142,12 +141,6 @@ class SFTPBrowser {
if (!state) return;
state.el.remove();
state.handle.remove();
var sessionPanel = document.getElementById('panel-' + sessionId);
if (sessionPanel) {
sessionPanel.classList.remove('has-sftp');
}
this.panels.delete(sessionId);
this._refitTerminal(sessionId);