Show commits-behind badge on Updates tab

Displays a gold badge next to the latest commit hash when the backend
returns a commitsBehind count greater than zero.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-15 09:24:31 +00:00
parent 4cff59f8ca
commit d0fb78da51

View file

@ -11,6 +11,7 @@ interface AppStatus {
latestCommit: string
latestCommitAt: string | null
updateAvailable: boolean
commitsBehind: number | null
deployed: boolean
checkedAt: string
}
@ -322,6 +323,16 @@ export function AdminMonitor({ user }: { user: User }) {
· {relativeTime(s.latestCommitAt)}
</span>
)}
{s.commitsBehind != null && s.commitsBehind > 0 && (
<span style={{
marginLeft: '0.6rem', fontFamily: 'sans-serif',
background: 'var(--gold)', color: 'var(--navy)',
borderRadius: '3px', padding: '0.05rem 0.35rem',
fontSize: '0.65rem', fontWeight: 700,
}}>
{s.commitsBehind} commit{s.commitsBehind !== 1 ? 's' : ''} behind
</span>
)}
</span>
)}
</div>