fix session with split screens

This commit is contained in:
2026-05-24 06:37:59 +00:00
parent 330cf01985
commit 45e18b5423
9 changed files with 760 additions and 224 deletions
+39 -5
View File
@@ -122,14 +122,48 @@
<span class="status-label" id="statusLabel">connecting...</span>
</div>
<div class="tb-right">
<!-- Copy session link -->
<button class="tb-btn accent" id="copyBtn" onclick="copyLink()" title="Copy session link">
<!-- Split left/right (Alt+\) -->
<button class="tb-btn" onclick="splitPane('h')" title="Split left/right (Alt+\)">
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="2" y="3" width="20" height="18" rx="2"/>
<line x1="12" y1="3" x2="12" y2="21"/>
</svg>
Split H
</button>
<!-- Split top/bottom (Alt+-) -->
<button class="tb-btn" onclick="splitPane('v')" title="Split top/bottom (Alt+-)">
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="2" y="3" width="20" height="18" rx="2"/>
<line x1="2" y1="12" x2="22" y2="12"/>
</svg>
Split V
</button>
<!-- Close active pane (Alt+X) -->
<button class="tb-btn" onclick="closePane()" title="Close active pane (Alt+X)">
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="2" y="3" width="20" height="18" rx="2"/>
<line x1="9" y1="9" x2="15" y2="15"/><line x1="15" y1="9" x2="9" y2="15"/>
</svg>
Pane X
</button>
<div class="tb-sep"></div>
<!-- Copy workspace link -->
<button class="tb-btn accent" id="copyBtn" onclick="copyLink()" title="Copy workspace link">
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="9" y="9" width="13" height="13" rx="2"/>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/>
</svg>
Link
</button>
<!-- End Session -->
<button class="tb-btn tb-danger" onclick="endSession()" title="End session — clears saved layout, next open starts fresh">
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/>
<polyline points="16 17 21 12 16 7"/>
<line x1="21" y1="12" x2="9" y2="12"/>
</svg>
End
</button>
<!-- Upload -->
<button class="tb-btn" onclick="openModal('upOverlay')" title="Upload file">
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
@@ -153,9 +187,9 @@
<div class="toast" id="toast"></div>
<script>
// Session context injected server-side consumed by app.js
const SESSION_ID = "[[SESSION_ID]]";
const AUTHED = [[AUTHED]];
// Workspace context injected server-side, consumed by app.js
const WORKSPACE_ID = "[[WORKSPACE_ID]]";
const AUTHED = [[AUTHED]];
</script>
<script src="/static/app.js"></script>
</body>