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

View File

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

View File

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

View File

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

View File

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