Skip to content

Commit 7f412fc

Browse files
committed
fix: redesign web terminal for HTTPS compatibility
- Remove iframe approach (blocked by Mixed Content policy) - Open terminal in popup window with auth credentials in URL - Add 'Show Details' button to display credentials and URL - Simplify WebTerminalButton to directly open terminal
1 parent df6f494 commit 7f412fc

2 files changed

Lines changed: 154 additions & 221 deletions

File tree

src/components/environment-panel.tsx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -878,12 +878,11 @@ echo "✓ SSH configured for all Teable dev environments"`;
878878
</div>
879879
</div>
880880

881-
{/* Web Terminal */}
881+
{/* Web Terminal Panel */}
882882
{isRunning && environment.externalIp && showWebTerminal && (
883883
<WebTerminal
884884
externalIp={environment.externalIp}
885885
ttydPassword={environment.ttydPassword}
886-
username="developer"
887886
instanceId={environment.instanceId}
888887
onClose={() => setShowWebTerminal(false)}
889888
/>
@@ -895,11 +894,19 @@ echo "✓ SSH configured for all Teable dev environments"`;
895894
<h3 className="text-lg font-semibold mb-6">Connect</h3>
896895

897896
{/* Web Terminal Button - Most prominent */}
898-
<div className="mb-6">
897+
<div className="mb-6 flex gap-3">
899898
<WebTerminalButton
900-
onClick={() => setShowWebTerminal(true)}
901-
disabled={showWebTerminal}
899+
externalIp={environment.externalIp}
900+
ttydPassword={environment.ttydPassword}
901+
instanceId={environment.instanceId}
902+
disabled={false}
902903
/>
904+
<button
905+
onClick={() => setShowWebTerminal(!showWebTerminal)}
906+
className="px-4 py-3 rounded-xl bg-slate-700 hover:bg-slate-600 text-slate-300 text-sm font-medium transition-colors"
907+
>
908+
{showWebTerminal ? "Hide Details" : "Show Details"}
909+
</button>
903910
</div>
904911

905912
{/* Quick Connect - IDE buttons */}

0 commit comments

Comments
 (0)