From 5ce3a80c5d3b3c3d8ebf8870b62d40273a341921 Mon Sep 17 00:00:00 2001 From: Karmaa Date: Sun, 9 Mar 2025 14:06:07 -0500 Subject: [PATCH] Fixed multi-line command issues with switching between split and not split. --- src/AddHostModal.jsx | 17 +++++++--- src/TabList.jsx | 16 ++++------ src/Terminal.jsx | 72 ++++++++++++++++++++++++------------------ src/backend/server.cjs | 4 +-- src/index.css | 20 ++++++++++++ 5 files changed, 80 insertions(+), 49 deletions(-) diff --git a/src/AddHostModal.jsx b/src/AddHostModal.jsx index 579f60e9..d73b78a3 100644 --- a/src/AddHostModal.jsx +++ b/src/AddHostModal.jsx @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; import { CssVarsProvider } from '@mui/joy/styles'; -import { Modal, Button, FormControl, FormLabel, Input, Stack, DialogTitle, DialogContent, ModalDialog, Select, Option, FormHelperText } from '@mui/joy'; +import { Modal, Button, FormControl, FormLabel, Input, Stack, DialogTitle, DialogContent, ModalDialog, Select, Option } from '@mui/joy'; import theme from './theme'; const AddHostModal = ({ isHidden, form, setForm, handleAddHost, setIsAddHostHidden }) => { @@ -31,15 +31,22 @@ const AddHostModal = ({ isHidden, form, setForm, handleAddHost, setIsAddHostHidd setIsAddHostHidden(true)}> + width: "auto", + maxWidth: "90vw", + minWidth: "fit-content", + overflow: "hidden", + display: "flex", + flexDirection: "column", + alignItems: "center", + }} + > Add Host
- + Host Name 0; return ( -
+
{terminals.map((terminal, index) => { const isActive = terminal.id === activeTab; const isSplit = splitTabIds.includes(terminal.id); - - const isSplitButtonDisabled = isActive && !isSplitScreenActive || splitTabIds.length >= 3 && !isSplit; + const isSplitButtonDisabled = (isActive && !isSplitScreenActive) || (splitTabIds.length >= 3 && !isSplit); return (
@@ -20,8 +19,7 @@ function TabList({ terminals, activeTab, setActiveTab, closeTab, toggleSplit, sp onClick={() => setActiveTab(terminal.id)} disabled={isSplit} sx={{ - backgroundColor: - isActive ? theme.palette.general.primary : theme.palette.general.disabled, + backgroundColor: isActive ? theme.palette.general.primary : theme.palette.general.disabled, color: theme.palette.text.primary, "&:hover": { backgroundColor: theme.palette.general.secondary }, ":disabled": { backgroundColor: theme.palette.general.disabled }, @@ -40,9 +38,7 @@ function TabList({ terminals, activeTab, setActiveTab, closeTab, toggleSplit, sp onClick={() => toggleSplit(terminal.id)} disabled={isSplitButtonDisabled || isActive} sx={{ - backgroundColor: isSplit - ? theme.palette.general.primary - : theme.palette.general.tertiary, + backgroundColor: isSplit ? theme.palette.general.primary : theme.palette.general.tertiary, color: theme.palette.text.primary, ":disabled": { backgroundColor: theme.palette.general.disabled }, "&:hover": { backgroundColor: theme.palette.general.secondary }, @@ -58,7 +54,7 @@ function TabList({ terminals, activeTab, setActiveTab, closeTab, toggleSplit, sp {/* Close Tab Button */}