mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
disable changing gpio
This commit is contained in:
@@ -83,6 +83,25 @@ const DashboardSensorsAnalogDialog = ({
|
|||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
<DialogContent dividers>
|
<DialogContent dividers>
|
||||||
<Grid container spacing={2}>
|
<Grid container spacing={2}>
|
||||||
|
<Grid item xs={4}>
|
||||||
|
<ValidatedTextField
|
||||||
|
fieldErrors={fieldErrors}
|
||||||
|
name="g"
|
||||||
|
label="GPIO"
|
||||||
|
disabled={!creating}
|
||||||
|
value={numberValue(editItem.g)}
|
||||||
|
type="number"
|
||||||
|
variant="outlined"
|
||||||
|
onChange={updateFormValue}
|
||||||
|
/>
|
||||||
|
</Grid>
|
||||||
|
{creating && (
|
||||||
|
<Grid item>
|
||||||
|
<Box color="warning.main" mt={2}>
|
||||||
|
<Typography variant="body2">{LL.WARN_GPIO()}</Typography>
|
||||||
|
</Box>
|
||||||
|
</Grid>
|
||||||
|
)}
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<ValidatedTextField
|
<ValidatedTextField
|
||||||
fieldErrors={fieldErrors}
|
fieldErrors={fieldErrors}
|
||||||
@@ -94,19 +113,6 @@ const DashboardSensorsAnalogDialog = ({
|
|||||||
onChange={updateFormValue}
|
onChange={updateFormValue}
|
||||||
/>
|
/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={4}>
|
|
||||||
<ValidatedTextField
|
|
||||||
fieldErrors={fieldErrors}
|
|
||||||
name="g"
|
|
||||||
label="GPIO"
|
|
||||||
value={numberValue(editItem.g)}
|
|
||||||
fullWidth
|
|
||||||
type="number"
|
|
||||||
variant="outlined"
|
|
||||||
autoFocus
|
|
||||||
onChange={updateFormValue}
|
|
||||||
/>
|
|
||||||
</Grid>
|
|
||||||
<Grid item xs={8}>
|
<Grid item xs={8}>
|
||||||
<TextField name="t" label={LL.TYPE(0)} value={editItem.t} fullWidth select onChange={updateFormValue}>
|
<TextField name="t" label={LL.TYPE(0)} value={editItem.t} fullWidth select onChange={updateFormValue}>
|
||||||
{AnalogTypeNames.map((val, i) => (
|
{AnalogTypeNames.map((val, i) => (
|
||||||
@@ -207,7 +213,7 @@ const DashboardSensorsAnalogDialog = ({
|
|||||||
name="f"
|
name="f"
|
||||||
label={LL.FREQ()}
|
label={LL.FREQ()}
|
||||||
value={numberValue(editItem.f)}
|
value={numberValue(editItem.f)}
|
||||||
fullWidth
|
// fullWidth
|
||||||
type="number"
|
type="number"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
onChange={updateFormValue}
|
onChange={updateFormValue}
|
||||||
@@ -222,7 +228,7 @@ const DashboardSensorsAnalogDialog = ({
|
|||||||
name="o"
|
name="o"
|
||||||
label={LL.DUTY_CYCLE()}
|
label={LL.DUTY_CYCLE()}
|
||||||
value={numberValue(editItem.o)}
|
value={numberValue(editItem.o)}
|
||||||
fullWidth
|
// fullWidth
|
||||||
type="number"
|
type="number"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
onChange={updateFormValue}
|
onChange={updateFormValue}
|
||||||
@@ -235,9 +241,6 @@ const DashboardSensorsAnalogDialog = ({
|
|||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Grid>
|
</Grid>
|
||||||
<Box color="warning.main" mt={2}>
|
|
||||||
<Typography variant="body2">{LL.WARN_GPIO()}</Typography>
|
|
||||||
</Box>
|
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
{!creating && (
|
{!creating && (
|
||||||
|
|||||||
Reference in New Issue
Block a user