Can configure network NAT settings from UI

This commit is contained in:
2024-01-09 21:57:18 +01:00
parent 71e22bc328
commit f82925dbcb
11 changed files with 446 additions and 11 deletions

View File

@ -9,7 +9,7 @@ import { TextInput } from "./TextInput";
export interface SelectOption {
value?: string;
label: string;
label?: string;
description?: string;
}
@ -23,9 +23,10 @@ export function SelectInput(p: {
if (!p.editable && !p.value) return <></>;
if (!p.editable) {
const value = p.options.find((o) => o.value === p.value)?.label;
const value = p.options.find((o) => o.value === p.value)?.label ?? p.value;
return <TextInput label={p.label} editable={p.editable} value={value} />;
}
return (
<FormControl fullWidth variant="standard" style={{ marginBottom: "15px" }}>
<InputLabel>{p.label}</InputLabel>
@ -41,7 +42,7 @@ export function SelectInput(p: {
style={{ fontStyle: e.value === undefined ? "italic" : undefined }}
>
<div>
{e.label}
{e.label ?? e.value}
{e.description && (
<Typography
component={"div"}