fix: add releases url

This commit is contained in:
shuai 2022-11-11 14:55:41 +08:00
parent 2b1ad94791
commit 8b11ab497b
1 changed files with 22 additions and 3 deletions

View File

@ -22,17 +22,36 @@ const HealthStatus: FC<IProps> = ({ data }) => {
<span className="text-secondary me-1">{t('version')}</span>
<strong>{version}</strong>
{isLatest && (
<Badge pill bg="success" className="ms-1">
<Badge
pill
bg="success"
className="ms-1"
as="a"
target="_blank"
href="https://github.com/answerdev/answer/releases">
{t('latest')}
</Badge>
)}
{!isLatest && remote_version && (
<Badge pill bg="warning" text="dark" className="ms-1">
<Badge
pill
bg="warning"
text="dark"
className="ms-1"
as="a"
target="_blank"
href="https://github.com/answerdev/answer/releases">
{t('update_to')} {remote_version}
</Badge>
)}
{!isLatest && !remote_version && (
<Badge pill bg="danger" className="ms-1">
<Badge
pill
bg="danger"
className="ms-1"
as="a"
target="_blank"
href="https://github.com/answerdev/answer/releases">
{t('check_failed')}
</Badge>
)}