Link update instructions to statusbar. (#41)

This commit is contained in:
Rich Burdon 2020-07-22 20:31:11 -04:00 committed by GitHub
parent 44ed288e2c
commit beb708e083
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 7 deletions

View File

@ -109,11 +109,7 @@ const StatusBar = () => {
</div>
<div className={classes.center}>
<div>{name} ({version})</div>
<div>{moment(buildDate).format('L')}</div>
</div>
<div className={classes.center}>
<div>{name} [{version} {moment(buildDate).format('L')}]</div>
<VersionCheck />
</div>

View File

@ -7,6 +7,7 @@ import get from 'lodash.get';
import React, { useEffect, useState } from 'react';
import { useQuery } from '@apollo/react-hooks';
import { makeStyles } from '@material-ui/core';
import Link from '@material-ui/core/Link';
import SYSTEM_STATUS from '../gql/system_status.graphql';
import WNS_RECORDS from '../gql/wns_records.graphql';
@ -15,6 +16,8 @@ import { useQueryStatusReducer } from '../hooks';
const CHECK_INTERVAL = 5 * 60 * 1000;
const UPDATE_LINK = 'https://github.com/dxos/kube#updating-the-system';
const useStyles = makeStyles(theme => ({
update: {
color: theme.palette.error.light
@ -59,10 +62,13 @@ const VersionCheck = () => {
return (
<>
{current && (
<div>SYS: {current}</div>
<div>System {current}</div>
)}
{latest && (
<div className={classes.update}>(LATEST: {latest})</div>
<div className={classes.update}>
(<Link href={UPDATE_LINK} target='github' title='Updating your KUBE'>LATEST: {latest}</Link>)
</div>
)}
</>
);