UI: fix interface breakages on some components. Features will be migrated later

This commit is contained in:
Johannes Kirschbauer
2024-12-20 20:14:42 +01:00
parent 450408b6cb
commit f747003893
5 changed files with 19 additions and 18 deletions

View File

@@ -248,7 +248,7 @@ export function StringField<T extends FieldValues, R extends ResponseData>(
{(options) => ( {(options) => (
<SelectInput <SelectInput
error={field.error} error={field.error}
altLabel={props.schema.title} // altLabel={props.schema.title}
label={props.path.join(".")} label={props.path.join(".")}
helperText={props.schema.description} helperText={props.schema.description}
value={field.value || []} value={field.value || []}
@@ -276,7 +276,7 @@ export function StringField<T extends FieldValues, R extends ResponseData>(
<TextInput <TextInput
inputProps={{ ...fieldProps, readonly }} inputProps={{ ...fieldProps, readonly }}
value={field.value as unknown as string} value={field.value as unknown as string}
type="password" // type="password"
error={field.error} error={field.error}
{...commonProps} {...commonProps}
// required // required
@@ -525,7 +525,7 @@ export function ArrayFields<T extends FieldValues, R extends ResponseData>(
<SelectInput <SelectInput
multiple multiple
error={field.error} error={field.error}
altLabel={props.schema.title} // altLabel={props.schema.title}
label={listFieldName} label={listFieldName}
helperText={props.schema.description} helperText={props.schema.description}
value={field.value || ""} value={field.value || ""}

View File

@@ -159,12 +159,12 @@ export const CreateClan = () => {
<div class="collapse-title link font-medium ">Advanced</div> <div class="collapse-title link font-medium ">Advanced</div>
<div class="collapse-content"> <div class="collapse-content">
<TextInput <TextInput
adornment={{ // adornment={{
content: ( // content: (
<span class="-mr-1 text-neutral-500">clan-core #</span> // <span class="-mr-1 text-neutral-500">clan-core #</span>
), // ),
position: "start", // position: "start",
}} // }}
inputProps={props} inputProps={props}
label="Template to use" label="Template to use"
value={field.value ?? ""} value={field.value ?? ""}

View File

@@ -217,12 +217,12 @@ const AdminModuleForm = (props: AdminModuleFormProps) => {
<TextInput <TextInput
inputProps={props} inputProps={props}
label={"Name"} label={"Name"}
adornment={{ // adornment={{
position: "start", // position: "start",
content: ( // content: (
<span class="material-icons text-gray-400">key</span> // <span class="material-icons text-gray-400">key</span>
), // ),
}} // }}
value={field.value ?? ""} value={field.value ?? ""}
error={field.error} error={field.error}
class="col-span-4" class="col-span-4"

View File

@@ -613,7 +613,8 @@ function WifiModule(props: MachineWifiProps) {
label="Password" label="Password"
value={field.value ?? ""} value={field.value ?? ""}
error={field.error} error={field.error}
type="password" // todo
// type="password"
required required
/> />
)} )}

View File

@@ -10,7 +10,7 @@ const toRGB = (value: string) =>
const mkBorderUtils = ( const mkBorderUtils = (
theme: (n: string) => unknown, theme: (n: string) => unknown,
prefix: string, prefix: string,
cssProperty: string cssProperty: string,
) => ({ ) => ({
// - def colors // - def colors
[`.${prefix}-def-1`]: { [`.${prefix}-def-1`]: {
@@ -278,5 +278,5 @@ export default plugin.withOptions(
}, },
...typography, ...typography,
}, },
}) }),
); );