mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
tooltip color, edit icon color, text changes
This commit is contained in:
@@ -36,6 +36,16 @@ const StyledTableCell = withStyles((theme: Theme) =>
|
|||||||
})
|
})
|
||||||
)(TableCell);
|
)(TableCell);
|
||||||
|
|
||||||
|
const CustomTooltip = withStyles((theme: Theme) => ({
|
||||||
|
tooltip: {
|
||||||
|
backgroundColor: theme.palette.secondary.main,
|
||||||
|
color: 'white',
|
||||||
|
boxShadow: theme.shadows[1],
|
||||||
|
fontSize: 11,
|
||||||
|
border: '1px solid #dadde9',
|
||||||
|
},
|
||||||
|
}))(Tooltip);
|
||||||
|
|
||||||
function compareDevices(a: Device, b: Device) {
|
function compareDevices(a: Device, b: Device) {
|
||||||
if (a.type < b.type) {
|
if (a.type < b.type) {
|
||||||
return -1;
|
return -1;
|
||||||
@@ -162,14 +172,14 @@ class EMSESPDevicesForm extends Component<EMSESPDevicesFormProps, EMSESPDevicesF
|
|||||||
{data.devices.sort(compareDevices).map((device) => (
|
{data.devices.sort(compareDevices).map((device) => (
|
||||||
<TableRow hover key={device.id} onClick={() => this.handleRowClick(device)}>
|
<TableRow hover key={device.id} onClick={() => this.handleRowClick(device)}>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
<Tooltip
|
<CustomTooltip
|
||||||
title={"DeviceID:0x" + ("00" + device.deviceid.toString(16).toUpperCase()).slice(-2) + " ProductID:" + device.productid + " Version:" + device.version}
|
title={"DeviceID:0x" + ("00" + device.deviceid.toString(16).toUpperCase()).slice(-2) + " ProductID:" + device.productid + " Version:" + device.version}
|
||||||
arrow placement="right-end"
|
placement="right-end"
|
||||||
>
|
>
|
||||||
<Button startIcon={<ListIcon />} size="small" variant="outlined">
|
<Button startIcon={<ListIcon />} size="small" variant="outlined">
|
||||||
{device.type}
|
{device.type}
|
||||||
</Button>
|
</Button>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell>{device.brand + " " + device.name} </TableCell>
|
<TableCell>{device.brand + " " + device.name} </TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
@@ -352,10 +362,13 @@ class EMSESPDevicesForm extends Component<EMSESPDevicesFormProps, EMSESPDevicesF
|
|||||||
<TableRow hover key={i}>
|
<TableRow hover key={i}>
|
||||||
<TableCell padding="checkbox" style={{ width: 18 }} >
|
<TableCell padding="checkbox" style={{ width: 18 }} >
|
||||||
{deviceData.data[i + 3] && me.admin && (
|
{deviceData.data[i + 3] && me.admin && (
|
||||||
<IconButton edge="start" size="small" aria-label="Edit"
|
<CustomTooltip title="change value" placement="left-end"
|
||||||
onClick={() => this.sendCommand(i)}>
|
>
|
||||||
<EditIcon fontSize="small" />
|
<IconButton edge="start" size="small" aria-label="Edit"
|
||||||
</IconButton>
|
onClick={() => this.sendCommand(i)}>
|
||||||
|
<EditIcon color="primary" fontSize="small" />
|
||||||
|
</IconButton>
|
||||||
|
</CustomTooltip>
|
||||||
)}
|
)}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell padding="none" component="th" scope="row">{deviceData.data[i + 2]}</TableCell>
|
<TableCell padding="none" component="th" scope="row">{deviceData.data[i + 2]}</TableCell>
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ class EMSESPSettingsForm extends React.Component<EMSESPSettingsFormProps> {
|
|||||||
<ValidatorForm onSubmit={saveData}>
|
<ValidatorForm onSubmit={saveData}>
|
||||||
<Box bgcolor="info.main" p={2} mt={2} mb={2}>
|
<Box bgcolor="info.main" p={2} mt={2} mb={2}>
|
||||||
<Typography variant="body1">
|
<Typography variant="body1">
|
||||||
Modify any of the EMS-ESP settings here. For help refer to the{" "}
|
Adjust any of the EMS-ESP settings here. For help refer to the{" "}
|
||||||
<Link
|
<Link
|
||||||
target="_blank"
|
target="_blank"
|
||||||
href="https://emsesp.github.io/docs/#/Configure-firmware32?id=ems-esp-settings"
|
href="https://emsesp.github.io/docs/#/Configure-firmware32?id=ems-esp-settings"
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class ValueForm extends React.Component<ValueFormProps> {
|
|||||||
return (
|
return (
|
||||||
<ValidatorForm onSubmit={onDoneEditing} ref={this.formRef}>
|
<ValidatorForm onSubmit={onDoneEditing} ref={this.formRef}>
|
||||||
<Dialog maxWidth="xs" onClose={onCancelEditing} aria-labelledby="user-form-dialog-title" open>
|
<Dialog maxWidth="xs" onClose={onCancelEditing} aria-labelledby="user-form-dialog-title" open>
|
||||||
<DialogTitle id="user-form-dialog-title">Modify the {devicevalue.name}</DialogTitle>
|
<DialogTitle id="user-form-dialog-title">Change the {devicevalue.name}</DialogTitle>
|
||||||
<DialogContent dividers>
|
<DialogContent dividers>
|
||||||
<TextValidator
|
<TextValidator
|
||||||
validators={['required']}
|
validators={['required']}
|
||||||
@@ -46,7 +46,7 @@ class ValueForm extends React.Component<ValueFormProps> {
|
|||||||
/>
|
/>
|
||||||
<Box color="warning.main" p={1} pl={0} pr={0} mt={0} mb={0}>
|
<Box color="warning.main" p={1} pl={0} pr={0} mt={0} mb={0}>
|
||||||
<Typography variant="body2">
|
<Typography variant="body2">
|
||||||
<i>Note: It may take a few seconds before the change is visible. If nothing happens check the logs.</i>
|
<i>Note: it may take a few seconds before the change is visible. If nothing happens check the logs.</i>
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|||||||
Reference in New Issue
Block a user