Skip to content

Commit

Permalink
Display current app version
Browse files Browse the repository at this point in the history
  • Loading branch information
undera committed Jul 12, 2023
1 parent 62d28a3 commit 89b5f23
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions pkg/frontend/src/components/AppStatusNotifier.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,19 @@ export default function AppStatusNotifier() {
return (<LinearProgress/>);
}

let upgradeStatus = (<></>)
let versionStatus = (<Typography variant="body2" sx={{fontSize: "0.75rem"}} className="pl-4 pt-2 text-gray-500">komoplane version: {status.CurVer}</Typography>)

let upgradeStatus = (<>{versionStatus}</>)
if (isNewerVersion(status.CurVer, status.LatestVer)) {
upgradeStatus = (
<Alert severity="info">
<Link color="inherit" href="https://github.com/komodorio/komoplane/releases">
New komoplane version available: {status.LatestVer}
</Link>
</Alert>
<>
{versionStatus}
<Alert severity="info">
<Link color="inherit" href="https://github.com/komodorio/komoplane/releases">
New komoplane version available: {status.LatestVer}
</Link>
</Alert>
</>
);
}

Expand Down

0 comments on commit 89b5f23

Please sign in to comment.