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:
parent
4cff59f8ca
commit
d0fb78da51
1 changed files with 11 additions and 0 deletions
|
|
@ -11,6 +11,7 @@ interface AppStatus {
|
||||||
latestCommit: string
|
latestCommit: string
|
||||||
latestCommitAt: string | null
|
latestCommitAt: string | null
|
||||||
updateAvailable: boolean
|
updateAvailable: boolean
|
||||||
|
commitsBehind: number | null
|
||||||
deployed: boolean
|
deployed: boolean
|
||||||
checkedAt: string
|
checkedAt: string
|
||||||
}
|
}
|
||||||
|
|
@ -322,6 +323,16 @@ export function AdminMonitor({ user }: { user: User }) {
|
||||||
· {relativeTime(s.latestCommitAt)}
|
· {relativeTime(s.latestCommitAt)}
|
||||||
</span>
|
</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>
|
</span>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue