feat: file manager on SSH hosts through a machine - open from the plus menu
This commit is contained in:
1 parent
2859e69abe
commit
7e4daeda4c
8 files changed
+202
-11
No files matched your search
@@ -198,10 +198,15 @@
|
||||
if (!W || !H) return;
|
||||
const L = rects(t.layout, t.c, t.r, W, H);
|
||||
t.view.classList.toggle('instant', !animate);
|
||||
// The pane in the top right corner sits under the corner "+": it keeps
|
||||
// its first bar clear of it.
|
||||
let corner = 0;
|
||||
L.panes.forEach((p, i) => { const c = L.panes[corner]; if (p.y < c.y || (p.y === c.y && p.x + p.w > c.x + c.w)) corner = i; });
|
||||
t.panes.forEach((s, i) => {
|
||||
const p = L.panes[i];
|
||||
s.el.style.left = p.x + 'px'; s.el.style.top = p.y + 'px';
|
||||
s.el.style.width = p.w + 'px'; s.el.style.height = p.h + 'px';
|
||||
s.el.classList.toggle('under-plus', i === corner);
|
||||
});
|
||||
while (t.gutters.length < L.gutters.length) {
|
||||
const g = document.createElement('div');
|
||||
@@ -639,7 +644,11 @@
|
||||
window.visualViewport.addEventListener('scroll', refit);
|
||||
}
|
||||
window.addEventListener('pagehide', () => {
|
||||
tabs.forEach(t => t.panes.forEach(s => { if (s.sid) navigator.sendBeacon(base + s.sid + '/close'); }));
|
||||
tabs.forEach(t => t.panes.forEach(s => {
|
||||
if (s.sid) navigator.sendBeacon(base + s.sid + '/close');
|
||||
// A file pane on an SSH host lets the machine drop its connection.
|
||||
if (s.src && s.src.close) s.src.close();
|
||||
}));
|
||||
});
|
||||
|
||||
// The view coming into sight: fit the panes, show the status line.
|
||||
|
||||
Reference in new issue
Block a user