Implemented all 9 UI fixes across health charts and activity detail pages. Changes are ready to push to git for the Docker build to pick them up.
This commit is contained in:
@@ -226,8 +226,9 @@ function SegmentRecords() {
|
||||
enabled: !!selectedRouteId,
|
||||
})
|
||||
|
||||
const theoreticalBest = bests?.length && bests.every(b => b.best_s != null)
|
||||
? bests.reduce((sum, b) => sum + b.best_s, 0)
|
||||
const kmBests = (bests || []).filter(b => b.name?.startsWith('km '))
|
||||
const theoreticalBest = kmBests.length && kmBests.every(b => b.best_s != null)
|
||||
? kmBests.reduce((sum, b) => sum + b.best_s, 0)
|
||||
: null
|
||||
|
||||
if (!routes?.length) return (
|
||||
@@ -314,7 +315,7 @@ function SegmentRecords() {
|
||||
</table>
|
||||
{theoreticalBest != null && (
|
||||
<div className="flex items-center justify-between px-4 py-3 border-t border-gray-800 bg-gray-900/60">
|
||||
<span className="text-xs text-gray-500">Theoretical best (sum of all segment bests)</span>
|
||||
<span className="text-xs text-gray-500">Theoretical best (1km splits only)</span>
|
||||
<span className="font-mono text-sm font-semibold text-blue-400">{formatDuration(theoreticalBest)}</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user