feat: auto dual-pane on connect, add resize handles, always show close btn

This commit is contained in:
loki5512344 2026-07-14 14:48:12 +02:00
parent 7ced3bc24f
commit b2413e5e5a
Signed by: boba
GPG key ID: 253067914055423B
3 changed files with 146 additions and 55 deletions

View file

@ -59,8 +59,13 @@ export async function spawnConnect(params) {
state.activeTabId = connectionId;
state.lastRemoteTabId = connectionId;
state.activePane = "remote";
// Replace first pane with new connection (click = switch, not split)
state.layout.panes[0].tabId = connectionId;
// Open dual-pane: local (left) + remote (right)
if (state.layout.panes.length === 1 && state.layout.panes[0].tabId === null) {
state.layout.panes.push({ id: `pane-${Date.now()}`, tabId: connectionId, flex: 1 });
state.layout.panes[0].flex = 1;
} else {
state.layout.panes[0].tabId = connectionId;
}
state.connectLoading = false;
state.showConnectDialog = false;
state.statusMessage = `Connected to ${params.host}`;