diff --git a/src/HomePage.jsx b/src/HomePage.jsx index 8c9cd69..e4ceb21 100644 --- a/src/HomePage.jsx +++ b/src/HomePage.jsx @@ -10,35 +10,35 @@ import { FieldHeader } from "./components/FieldHeader/FieldHeader"; function HomePage() { // for testing with npm run dev please uncomment this block - // const appConfig = { - // spawners: { - // "test": { - // last_activity: "2024-11-24T15:48:29.604740Z", - // url: "/user/test", - // active: true, - // ready: false, - // }, - // "test1": { - // last_activity: "2024-11-24T15:46:56.719146Z", - // url: "/user/test1", - // active: false, - // ready: false, - // }, - // ...Array.from({ length: 50 }, (_, i) => `spawner${i + 1}`).reduce((acc, spawner) => { - // acc[spawner] = { - // last_activity: new Date().toISOString(), - // url: `/user/${spawner}`, - // active: Math.random() < 0.5, // Randomly set active status - // ready: Math.random() < 0.5, // Randomly set ready status - // }; - // return acc; - // }, {}) - // }, - // default_server_active: false, - // url: "http://localhost", - // userName: "dev", - // xsrf: "sample-xsrf-token", - // }; + const appConfig = { + spawners: { + "test": { + last_activity: "2024-11-24T15:48:29.604740Z", + url: "/user/test", + active: true, + ready: false, + }, + "test1": { + last_activity: "2024-11-24T15:46:56.719146Z", + url: "/user/test1", + active: false, + ready: false, + }, + ...Array.from({ length: 50 }, (_, i) => `spawner${i + 1}`).reduce((acc, spawner) => { + acc[spawner] = { + last_activity: new Date().toISOString(), + url: `/user/${spawner}`, + active: Math.random() < 0.5, // Randomly set active status + ready: Math.random() < 0.5, // Randomly set ready status + }; + return acc; + }, {}) + }, + default_server_active: false, + url: "http://localhost", + userName: "dev", + xsrf: "sample-xsrf-token", + }; const [spawners, setSpawners] = useState(appConfig.spawners); const [defaultServerActive, setDefaultServerActive] = useState( @@ -148,9 +148,13 @@ function HomePage() { {isOpen &&
{children}
} diff --git a/src/components/FieldHeader/FieldHeader.css b/src/components/FieldHeader/FieldHeader.css index b421952..ca4fb7f 100644 --- a/src/components/FieldHeader/FieldHeader.css +++ b/src/components/FieldHeader/FieldHeader.css @@ -1,7 +1,7 @@ .field-header { background-color: var(--primary-color); color: white; - padding: 1rem; + padding: 0.6rem; font-size: 16px; border: none; text-align: left; @@ -9,6 +9,12 @@ margin-bottom: 0.25rem; display: flex; justify-content: space-between; + align-items: center; /* Ensures vertical alignment */ +} + +.field-header .activeText { + font-size: 18px; + margin-left: auto; } .field-children { diff --git a/src/components/FieldHeader/FieldHeader.tsx b/src/components/FieldHeader/FieldHeader.tsx index f47fc00..648f950 100644 --- a/src/components/FieldHeader/FieldHeader.tsx +++ b/src/components/FieldHeader/FieldHeader.tsx @@ -5,12 +5,14 @@ import { InfoBox } from "../InfoBox/InfoBox"; interface FieldHeaderProps { infoText?: string; title: string; + activeText?: string; children: React.ReactNode; } export const FieldHeader: React.FC = ({ title = "", infoText = "", + activeText= "", children, }) => { const info = ; @@ -18,8 +20,11 @@ export const FieldHeader: React.FC = ({ return (
- {title} - {infoText !== "" && info} +

{title}

+

{activeText}

+

{infoText !== "" && info}

+ + {/*{activeText}*/}
{children}
diff --git a/src/components/Form/ProgressiveForm.css b/src/components/Form/ProgressiveForm.css index e31b995..4b471ac 100644 --- a/src/components/Form/ProgressiveForm.css +++ b/src/components/Form/ProgressiveForm.css @@ -1,7 +1,7 @@ .form-wrap { display: flex; flex-direction: column; - gap: 1.25rem; + gap: 0rem; } .btns_wrap {