Skip to content

Commit 9962f16

Browse files
authored
Merge pull request #1336 from proddy/dev
fixed helper text in entity dialog for numeric values
2 parents 9641adc + cb10663 commit 9962f16

17 files changed

+833
-96
lines changed

CHANGELOG_LATEST.md

+3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@
1010
- telegrams for RC100H, hc2 (seen on discord)
1111
- names for BC400, GB192i, read temperatures for low loss header and heatblock [#1317](https://github.com/emsesp/EMS-ESP32/discussions/1317)
1212
- option for `forceheatingoff` [#1262](https://github.com/emsesp/EMS-ESP32/issues/1262)
13+
- shower_data MQTT payload contains the timestamp [#1329](https://github.com/emsesp/EMS-ESP32/issues/1329)
1314

1415
## Fixed
1516

17+
- fixed helper text in Web Device Entity dialog box for numerical ranges
18+
1619
## Changed
1720

1821
- update to arduino 2.0.14 / idf 4.4.6

interface/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "EMS-ESP",
3-
"version": "3.6.0",
3+
"version": "3.6",
44
"description": "build EMS-ESP WebUI",
55
"homepage": "https://emsesp.github.io/docs",
66
"author": "proddy",

interface/src/i18n/de/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ const de: Translation = {
231231
BROKER: 'Broker',
232232
CLIENT: 'Client',
233233
BASE_TOPIC: 'Base',
234-
OPTIONAL: 'Optional',
234+
OPTIONAL: 'Optional', // TODO translate
235235
FORMATTING: 'Formattierung',
236236
MQTT_FORMAT: 'Topic/Payload Format',
237237
MQTT_NEST_1: 'Eingebettet in einem Gesamttopic',

interface/src/i18n/en/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ const en: Translation = {
231231
BROKER: 'Broker',
232232
CLIENT: 'Client',
233233
BASE_TOPIC: 'Base',
234-
OPTIONAL: 'Optional',
234+
OPTIONAL: 'optional',
235235
FORMATTING: 'Formatting',
236236
MQTT_FORMAT: 'Topic/Payload Format',
237237
MQTT_NEST_1: 'Nested in a single topic',

interface/src/i18n/fr/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ const fr: Translation = {
231231
BROKER: 'Broker',
232232
CLIENT: 'Client',
233233
BASE_TOPIC: 'Base',
234-
OPTIONAL: 'Optionnel',
234+
OPTIONAL: 'optionnel',
235235
FORMATTING: 'Mise en forme',
236236
MQTT_FORMAT: 'Format du Topic/Payload',
237237
MQTT_NEST_1: 'Englobé dans un topic unique',

interface/src/i18n/it/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ const it: Translation = {
233233
BROKER: 'Broker',
234234
CLIENT: 'Cliente',
235235
BASE_TOPIC: 'Base',
236-
OPTIONAL: 'Opzionale',
236+
OPTIONAL: 'opzionale',
237237
FORMATTING: 'Formattazione',
238238
MQTT_FORMAT: 'Formato Topic/Payload ',
239239
MQTT_NEST_1: 'Inserito in un singolo argomento',

interface/src/i18n/nl/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ const nl: Translation = {
231231
BROKER: 'Broker',
232232
CLIENT: 'Client',
233233
BASE_TOPIC: 'Base',
234-
OPTIONAL: 'Optioneel',
234+
OPTIONAL: 'optioneel',
235235
FORMATTING: 'Formatteren',
236236
MQTT_FORMAT: 'Topic/Payload Formattering',
237237
MQTT_NEST_1: 'Genest in 1 topic',

interface/src/i18n/no/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ const no: Translation = {
231231
BROKER: 'Broker',
232232
CLIENT: 'Client',
233233
BASE_TOPIC: 'Base',
234-
OPTIONAL: 'Valgfritt',
234+
OPTIONAL: 'valgfritt',
235235
FORMATTING: 'Formatering',
236236
MQTT_FORMAT: 'Topic/Payload Format',
237237
MQTT_NEST_1: 'Nestet i en topic',

interface/src/i18n/sv/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ const sv: Translation = {
231231
BROKER: 'Broker',
232232
CLIENT: 'Client',
233233
BASE_TOPIC: 'Base',
234-
OPTIONAL: 'Valfritt',
234+
OPTIONAL: 'valfritt',
235235
FORMATTING: 'Formatering',
236236
MQTT_FORMAT: 'Topic/Payload Format',
237237
MQTT_NEST_1: 'Nestlat i en topic.',

interface/src/i18n/tr/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ const tr: Translation = {
231231
BROKER: 'Aracı',
232232
CLIENT: 'İstemci',
233233
BASE_TOPIC: 'Merkez',
234-
OPTIONAL: 'Seçenekli',
234+
OPTIONAL: 'seçenekli',
235235
FORMATTING: 'Biçimlendiriliyor',
236236
MQTT_FORMAT: 'Konu/Mesaj Biçimi',
237237
MQTT_NEST_1: 'Tek konu üzerine yerleşmiş',

interface/src/project/DashboardDevicesDialog.tsx

+11-22
Original file line numberDiff line numberDiff line change
@@ -89,27 +89,16 @@ const DashboardDevicesDialog = ({
8989
}
9090
};
9191

92-
const showHelperText = (dv: DeviceValue) => {
93-
if (dv.h) {
94-
return dv.h;
95-
}
96-
if (dv.l) {
97-
return '[ ' + dv.l.join(' | ') + ' ]';
98-
}
99-
100-
let helperText = '<';
101-
if (dv.s) {
102-
helperText += 'n';
103-
if (dv.m !== undefined && dv.x !== undefined) {
104-
helperText += ' between ' + dv.m + ' and ' + dv.x;
105-
} else {
106-
helperText += ' , step ' + dv.s;
107-
}
108-
} else {
109-
helperText += 'text';
110-
}
111-
return helperText + '>';
112-
};
92+
const showHelperText = (dv: DeviceValue) =>
93+
dv.h ? (
94+
dv.h
95+
) : dv.l ? (
96+
dv.l.join(' | ')
97+
) : dv.m !== undefined && dv.x !== undefined ? (
98+
<>
99+
{dv.m}&nbsp;&rarr;&nbsp;{dv.x}
100+
</>
101+
) : undefined;
113102

114103
return (
115104
<Dialog sx={dialogStyle} open={open} onClose={close}>
@@ -171,7 +160,7 @@ const DashboardDevicesDialog = ({
171160
</Grid>
172161
{writeable && (
173162
<Grid item>
174-
<FormHelperText>format:&nbsp;{showHelperText(editItem)}</FormHelperText>
163+
<FormHelperText>{showHelperText(editItem)}</FormHelperText>
175164
</Grid>
176165
)}
177166
</Grid>

mock-api/package.json

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
{
2-
"name": "mock-api",
2+
"name": "api",
3+
"version": "1.0.0",
4+
"description": "mock api for EMS-ESP",
5+
"author": "proddy",
6+
"main": "server.js",
7+
"scripts": {
8+
"dev": "node --watch ./server.js localhost 3080",
9+
"test": "echo \"Error: no test specified\" && exit 1"
10+
},
11+
"dependencies": {
12+
"@msgpack/msgpack": "^2.8.0",
13+
"compression": "^1.7.4",
14+
"express": "^4.18.2",
15+
"multer": "^1.4.5-lts.1"
16+
},
317
"packageManager": "yarn@4.0.0-rc.53"
418
}

0 commit comments

Comments
 (0)