mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
Lead the meta line with the unit in the phone measurement list
On a phone a long unit beside the value ('12,5 Atemzüge/min') pushed
the row's controls. The value stands alone and the unit opens the muted
meta line beside the time and source, where meta belongs.
This commit is contained in:
1 parent
5850036527
commit
7d738c0e49
1 file changed
+22
-17
@@ -1500,23 +1500,14 @@ export function MeasurementList({
|
||||
their native decimal precision so
|
||||
"78.4 kg" no longer truncates to "78".
|
||||
v1.11.5 — sleep rows render TIME ASLEEP. */}
|
||||
{isSleep ? (
|
||||
formatDurationMinutes(m.value, t)
|
||||
) : (
|
||||
<>
|
||||
{isGrouped
|
||||
? fmt.integer(m.value)
|
||||
: fmt.number(
|
||||
rowDisplay(m).value,
|
||||
rawDisplayFractionDigits(m.type),
|
||||
)}{" "}
|
||||
{measurementUnitLabel(
|
||||
m.type,
|
||||
isGrouped ? m.unit : rowDisplay(m).unit,
|
||||
t,
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
{isSleep
|
||||
? formatDurationMinutes(m.value, t)
|
||||
: isGrouped
|
||||
? fmt.integer(m.value)
|
||||
: fmt.number(
|
||||
rowDisplay(m).value,
|
||||
rawDisplayFractionDigits(m.type),
|
||||
)}
|
||||
</span>
|
||||
{isSleep ? (
|
||||
<SleepNightCaption m={m} />
|
||||
@@ -1536,6 +1527,20 @@ export function MeasurementList({
|
||||
site. Relative under 24 h, absolute
|
||||
older.
|
||||
*/}
|
||||
{/* The unit is meta, and on a phone a long
|
||||
one ("Atemzüge/min") beside the value pushed
|
||||
the row's controls; it leads the meta line
|
||||
instead. Sleep reads as a duration. */}
|
||||
{isSleep ? null : (
|
||||
<span data-slot="measurement-row-unit">
|
||||
{measurementUnitLabel(
|
||||
m.type,
|
||||
isGrouped ? m.unit : rowDisplay(m).unit,
|
||||
t,
|
||||
)}
|
||||
{" · "}
|
||||
</span>
|
||||
)}
|
||||
{m.dayKey !== undefined ? (
|
||||
<DayLink date={m.dayKey}>
|
||||
{formatDateOrRelative(m.measuredAt, t)}
|
||||
|
||||
Reference in new issue
Block a user