@iobroker/adapter-react-v5 7.4.17 → 7.4.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2020-
|
|
2
|
+
* Copyright 2020-2025, Denis Haev <dogafox@gmail.com>
|
|
3
3
|
*
|
|
4
4
|
* MIT License
|
|
5
5
|
*
|
|
@@ -1613,12 +1613,20 @@ function formatValue(options) {
|
|
|
1613
1613
|
valText.v = v;
|
|
1614
1614
|
}
|
|
1615
1615
|
}
|
|
1616
|
+
if (valText.v?.length > 40) {
|
|
1617
|
+
valText.v = `${valText.v.substring(0, 40)}...`;
|
|
1618
|
+
}
|
|
1616
1619
|
if (isCommon?.unit) {
|
|
1617
1620
|
valText.u = isCommon.unit;
|
|
1618
1621
|
}
|
|
1619
1622
|
let valFull;
|
|
1620
1623
|
if (options.full) {
|
|
1621
|
-
|
|
1624
|
+
if (typeof v === 'string' && v.length > 100) {
|
|
1625
|
+
valFull = [{ t: texts.value, v: `${v.substring(0, 100)}...` }];
|
|
1626
|
+
}
|
|
1627
|
+
else {
|
|
1628
|
+
valFull = [{ t: texts.value, v }];
|
|
1629
|
+
}
|
|
1622
1630
|
if (state) {
|
|
1623
1631
|
if (state.ack !== undefined && state.ack !== null) {
|
|
1624
1632
|
valFull.push({ t: texts.ack, v: state.ack.toString() });
|