From b0062343c75ed60a38c1dd80365d7cd12c935cd7 Mon Sep 17 00:00:00 2001 From: Karmaa <88517757+LukeGus@users.noreply.github.com> Date: Sun, 9 Mar 2025 18:46:09 -0500 Subject: [PATCH] Dev 1.1 (#18) * Update server.cjs (#17) Redact only sensitive info for logging * Changes to README.md for clear support paths. * Switched to UTF-8 fixing non-english character bugs, revamped console logging system, fixed misc console errors, and fixed copy/paste. Warning: the terminal sizing in this version is very buggy so be warned. * Fixed multi-line command issues with switching between split and not split. * Shifted terminal down and to the right so its not squished up in the top left corner. Fix scroll wheel sizing and looks. Prepared for this bug update release. --------- Co-authored-by: Dale Driver --- README.md | 3 ++ src/AddHostModal.jsx | 39 +++++++++--------- src/App.jsx | 3 +- src/TabList.jsx | 16 +++----- src/Terminal.jsx | 90 ++++++++++++++++++++++++++++-------------- src/backend/server.cjs | 33 ++++++++-------- src/index.css | 20 ++++++++++ 7 files changed, 128 insertions(+), 76 deletions(-) diff --git a/README.md b/README.md index c57af3eb..713474c1 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,9 @@ Termix is an open-source forever free self-hosted SSH (other protocols planned, # Installation Visit the Termix [Wiki](https://github.com/LukeGus/Termix/wiki) for information on how to install Termix. You can also use these links to go directly to guide. [Docker](https://github.com/LukeGus/Termix/wiki/Docker) or [Manual](https://github.com/LukeGus/Termix/wiki/Manual). +# Support +If you need help with Termix, you can join the [Discord](https://discord.gg/jVQGdvHDrf) server and visit the support channel. You can also open an issue or open a pull request on the [GitHub](https://github.com/LukeGus/Termix/issues) repo. + # Show-off ![Demo Image](repo-images/DemoImage1.png) diff --git a/src/AddHostModal.jsx b/src/AddHostModal.jsx index b7c65dc6..d73b78a3 100644 --- a/src/AddHostModal.jsx +++ b/src/AddHostModal.jsx @@ -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 setForm({ ...form, name: e.target.value })} - required={false} sx={{ backgroundColor: theme.palette.general.primary, color: theme.palette.text.primary, }} /> - + Host IP setForm({ ...form, ip: e.target.value })} required - error={!form.ip ? "Please provide an IP address" : ""} sx={{ backgroundColor: theme.palette.general.primary, color: theme.palette.text.primary, }} /> - + Host User setForm({ ...form, user: e.target.value })} required - error={form.user ? "" : "Please provide a username"} sx={{ backgroundColor: theme.palette.general.primary, color: theme.palette.text.primary, }} /> - + Authentication Method {form.authMethod === 'password' && ( - + Host Password setForm({ ...form, password: e.target.value })} required - error={form.password ? "" : "Please provide a password"} sx={{ backgroundColor: theme.palette.general.primary, color: theme.palette.text.primary, @@ -127,13 +128,12 @@ const AddHostModal = ({ isHidden, form, setForm, handleAddHost, setIsAddHostHidd )} {form.authMethod === 'rsaKey' && ( - + RSA Key )} - + 65535}> Host Port 65535 ? "Port must be between 1 and 65535" : ""} sx={{ backgroundColor: theme.palette.general.primary, color: theme.palette.text.primary, diff --git a/src/App.jsx b/src/App.jsx index 2a943d96..6c1a6474 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -21,6 +21,7 @@ function App() { user: "", password: "", port: 22, + authMethod: "Select Auth", }); const [isLaunchpadOpen, setIsLaunchpadOpen] = useState(false); const [splitTabIds, setSplitTabIds] = useState([]); @@ -90,7 +91,7 @@ function App() { user: form.user, password: form.authMethod === 'password' ? form.password : undefined, rsaKey: form.authMethod === 'rsaKey' ? form.rsaKey : undefined, - port: Number(form.port), + port: String(form.port), }, terminalRef: null, }; diff --git a/src/TabList.jsx b/src/TabList.jsx index cb4ebf26..59b4a486 100644 --- a/src/TabList.jsx +++ b/src/TabList.jsx @@ -5,12 +5,11 @@ function TabList({ terminals, activeTab, setActiveTab, closeTab, toggleSplit, sp const isSplitScreenActive = splitTabIds.length > 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 */}