From 223b6bbca705f455fffb92a289a1a5dd30e811fd Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Sat, 4 Nov 2023 14:55:32 +0100 Subject: [PATCH] style & explanation text --- .../createMachineForm/clanModules.tsx | 24 ++++++++++++++++--- .../createMachineForm/customConfig.tsx | 1 + 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/pkgs/ui/src/components/createMachineForm/clanModules.tsx b/pkgs/ui/src/components/createMachineForm/clanModules.tsx index cf99fec68..53fce2f9d 100644 --- a/pkgs/ui/src/components/createMachineForm/clanModules.tsx +++ b/pkgs/ui/src/components/createMachineForm/clanModules.tsx @@ -1,5 +1,6 @@ import { setMachineSchema } from "@/api/machine/machine"; import { useListClanModules } from "@/api/modules/modules"; +import { Alert, AlertTitle, FormHelperText, Typography } from "@mui/material"; import Box from "@mui/material/Box"; import Chip from "@mui/material/Chip"; import FormControl from "@mui/material/FormControl"; @@ -38,7 +39,9 @@ export default function ClanModules(props: ClanModulesProps) { } }); formHooks.setValue("modules", []); - }, [clanName, formHooks]); + // Only re-run if global clanName has changed + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [clanName]); const handleChange = ( event: SelectChangeEvent, @@ -57,8 +60,20 @@ export default function ClanModules(props: ClanModulesProps) { }); }; return ( -
- +
+ + Info + Optionally select some modules —{" "} + + This will affect the configurable options in the next steps! + + + For example, if you add "xfce", some configuration options + for xfce will be added. + + + + Modules + + (Optional) Select clan modules to be added. +
); diff --git a/pkgs/ui/src/components/createMachineForm/customConfig.tsx b/pkgs/ui/src/components/createMachineForm/customConfig.tsx index f845995bb..bccf78369 100644 --- a/pkgs/ui/src/components/createMachineForm/customConfig.tsx +++ b/pkgs/ui/src/components/createMachineForm/customConfig.tsx @@ -96,6 +96,7 @@ function PureCustomConfig(props: PureCustomConfigProps) { console.log({ configData }); const setConfig = (data: IChangeEvent) => { + console.log("config changed", { data }); setValue("config", data); };