Skip to content

Commit

Permalink
Minor enhancements
Browse files Browse the repository at this point in the history
### UPDATED
- Title on Sensors Tab for each configured sensor (Settings UI)
- Tested on Homebridge v2.0.0-beta.20
  • Loading branch information
mrjackyliang committed Sep 13, 2024
1 parent b84f8b9 commit ec16a06
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 16 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "homebridge-adt-pulse",
"displayName": "Homebridge ADT Pulse",
"version": "3.4.1",
"version": "3.4.2",
"description": "Homebridge security system platform for ADT Pulse",
"main": "./build/index.js",
"exports": "./build/index.js",
Expand Down Expand Up @@ -62,7 +62,7 @@
],
"homepage": "https://github.com/mrjackyliang/homebridge-adt-pulse",
"engines": {
"homebridge": "~1.8.0",
"homebridge": "~1.8.0 || ~2.0.0-beta.20",
"node": ">=20"
},
"dependencies": {
Expand Down
44 changes: 30 additions & 14 deletions src/config-ui/vite/src/pages/settings-sensors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,20 +94,36 @@ export default function SettingsSensors(props: SettingsSensorsProps) {
aria-controls={`collapse-${sensor.id}`}
>
<div className="d-flex justify-content-between" style={styles.sensorHeader}>
{
(getSensorHeader(index).name !== null) ? (
<span>
{getSensorHeader(index).name}
</span>
) : null
}
{
(getSensorHeader(index).adtName !== null) ? (
<span className="text-secondary fst-italic">
{getSensorHeader(index).adtName}
</span>
) : null
}
<div className="container-fluid">
<div className="row">
{
(getSensorHeader(index).name !== null && getSensorHeader(index).adtName !== null) ? (
<>
<div className="col-6 text-break">
{getSensorHeader(index).name}
</div>
<div className="col-6 text-secondary text-end text-break fst-italic">
{getSensorHeader(index).adtName}
</div>
</>
) : null
}
{
(getSensorHeader(index).name !== null && getSensorHeader(index).adtName === null) ? (
<div className="col-6 text-break">
{getSensorHeader(index).name}
</div>
) : null
}
{
(getSensorHeader(index).name === null && getSensorHeader(index).adtName !== null) ? (
<div className="col-6 text-break">
{getSensorHeader(index).adtName}
</div>
) : null
}
</div>
</div>
</div>
</button>
</div>
Expand Down

0 comments on commit ec16a06

Please sign in to comment.