[FEATURE] Migrated to new loading sequence (#6)
Co-authored-by: Dunemask <dunemask@gmail.com> Reviewed-on: https://gitea.dunemask.dev/elysium/minecluster/pulls/6
This commit is contained in:
parent
fb57c03ba7
commit
6eb4ed3e95
53 changed files with 1349 additions and 449 deletions
26
src/components/server-options/CpuOption.jsx
Normal file
26
src/components/server-options/CpuOption.jsx
Normal file
|
@ -0,0 +1,26 @@
|
|||
import TextField from "@mui/material/TextField";
|
||||
import MenuItem from "@mui/material/MenuItem";
|
||||
|
||||
const maxCpuSupported = 8;
|
||||
export const cpuOptions = new Array(2 * maxCpuSupported)
|
||||
.fill(0)
|
||||
.map((v, i) => (i + 1) * 0.5);
|
||||
|
||||
export default function CpuOption(props) {
|
||||
const { value, onChange } = props;
|
||||
return (
|
||||
<TextField
|
||||
label="CPU"
|
||||
onChange={onChange}
|
||||
value={value}
|
||||
select
|
||||
required
|
||||
SelectProps={{ MenuProps: { sx: { maxHeight: "20rem" } } }}
|
||||
disabled // TODO: Enable on backend support
|
||||
>
|
||||
{cpuOptions.map((o, i) => (
|
||||
<MenuItem value={o} key={i}>{`${o} CPU`}</MenuItem>
|
||||
))}
|
||||
</TextField>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue