From 87221a10e949d79591801a1063312e0f911cf442 Mon Sep 17 00:00:00 2001 From: mbecker20 Date: Sun, 19 Oct 2025 12:56:11 -0700 Subject: [PATCH] fix mobile ContainerTerminal responsiveness --- .../src/components/terminal/container.tsx | 124 +++++++++--------- 1 file changed, 61 insertions(+), 63 deletions(-) diff --git a/frontend/src/components/terminal/container.tsx b/frontend/src/components/terminal/container.tsx index 1ae437329..339769790 100644 --- a/frontend/src/components/terminal/container.tsx +++ b/frontend/src/components/terminal/container.tsx @@ -42,8 +42,8 @@ export const ContainerTerminal = ({ "sh" ); const [mode, setMode] = useLocalStorage( - `${storageKey}-term-mode-v1`, - Types.ContainerTerminalMode.Attach + `${storageKey}-term-mode-v2`, + Types.ContainerTerminalMode.Exec ); const [otherShell, setOtherShell] = useState(""); @@ -68,76 +68,74 @@ export const ContainerTerminal = ({
- - docker - - {mode === Types.ContainerTerminalMode.Exec ? "-it " : ""}container - + setMode(mode as Types.ContainerTerminalMode) + } + > + + + + + + {Object.values(Types.ContainerTerminalMode).map((mode) => ( + + {mode} + + ))} + + + + {mode === Types.ContainerTerminalMode.Exec ? "-it " : ""}container + setOtherShell(e.target.value)} - onKeyDown={(e) => { - if (e.key === "Enter") { - setShell(otherShell); - setOtherShell(""); - } else { - e.stopPropagation(); - } - }} - /> - - - - + + + + + {[ + ...BASE_SHELLS, + ...(!BASE_SHELLS.includes(shell) ? [shell] : []), + ].map((shell) => ( + + {shell} + + ))} + setOtherShell(e.target.value)} + onKeyDown={(e) => { + if (e.key === "Enter") { + setShell(otherShell); + setOtherShell(""); + } else { + e.stopPropagation(); + } + }} + /> + + + - + } >