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:
@@ -37,8 +37,9 @@ function SegmentsPanel({ routeId, sportType }) {
|
||||
const kmSplits = segments.filter(s => s.name.startsWith('km '))
|
||||
const hillsTurns = segments.filter(s => !s.name.startsWith('km '))
|
||||
|
||||
const theoreticalBest = 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
|
||||
|
||||
const renderGroup = (group, title) => {
|
||||
@@ -79,7 +80,7 @@ function SegmentsPanel({ routeId, sportType }) {
|
||||
{renderGroup(hillsTurns, 'Hills & Turns')}
|
||||
{theoreticalBest != null && (
|
||||
<div className="flex items-center justify-between pt-1 border-t border-gray-800/50">
|
||||
<span className="text-xs text-gray-500">Theoretical best (sum of segment bests)</span>
|
||||
<span className="text-xs text-gray-500">Theoretical best (1km splits only)</span>
|
||||
<span className="font-mono text-xs font-semibold text-blue-400">{formatDuration(theoreticalBest)}</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user