formatting text

This commit is contained in:
proddy
2024-10-27 10:47:39 +01:00
parent 4fdf1d810e
commit 72a515faab

View File

@@ -11,9 +11,11 @@ import {
DialogActions, DialogActions,
DialogContent, DialogContent,
DialogTitle, DialogTitle,
Divider,
Link, Link,
Typography Typography
} from '@mui/material'; } from '@mui/material';
import Grid from '@mui/material/Grid2';
import * as SystemApi from 'api/system'; import * as SystemApi from 'api/system';
import { callAction } from 'api/app'; import { callAction } from 'api/app';
@@ -182,43 +184,55 @@ const Version = () => {
return ( return (
<> <>
<Typography variant="h6" color="primary"> <Box p={2} border="1px solid grey" borderRadius={2}>
Firmware Version Check <Grid container spacing={3}>
</Typography> <Grid mb={1}>
<Typography mb={1} fontWeight={'fontWeightBold'}>
<Box p={2} mt={2} border="1px solid grey" borderRadius={2}> {LL.VERSION()}
<Typography>
<b>{LL.VERSION() + ':'}</b>&nbsp;{data.emsesp_version}
{data.build_flags && (
<Typography variant="caption">
&nbsp; &#40;{data.build_flags}&#41;
</Typography> </Typography>
)} <Typography mb={1} fontWeight={'fontWeightBold'}>
</Typography> Platform
<Typography> </Typography>
<b>Platform:</b>&nbsp;{getPlatform()} <Typography mb={1} fontWeight={'fontWeightBold'}>
</Typography> Release
</Typography>
</Grid>
<Grid>
<Typography mb={1}>
{data.emsesp_version}
{data.build_flags && (
<Typography variant="caption">
&nbsp; &#40;{data.build_flags}&#41;
</Typography>
)}
</Typography>
<Typography mb={1}>{getPlatform()}</Typography>
<Typography>
{isDev ? LL.DEVELOPMENT() : LL.STABLE()}&nbsp;
<Link
target="_blank"
href={useDev ? DEV_RELNOTES_URL : STABLE_RELNOTES_URL}
color="primary"
>
(changelog)
</Link>
</Typography>
</Grid>
</Grid>
<Typography> <Divider />
<b>Release:</b>&nbsp;
<Link {!isDev && (
target="_blank" <Button
href={useDev ? DEV_RELNOTES_URL : STABLE_RELNOTES_URL} sx={{ mt: 2 }}
variant="outlined"
color="primary" color="primary"
size="small"
onClick={() => showFirmwareDialog(true)}
> >
{isDev ? LL.DEVELOPMENT() : LL.STABLE()} {LL.SWITCH_DEV()}
</Link> </Button>
{!isDev && ( )}
<Button
sx={{ ml: 2 }}
variant="outlined"
color="primary"
onClick={() => showFirmwareDialog(true)}
>
{LL.SWITCH_DEV()}
</Button>
)}
</Typography>
<Typography mt={2} color="warning"> <Typography mt={2} color="warning">
<InfoOutlinedIcon color="warning" sx={{ verticalAlign: 'middle' }} /> <InfoOutlinedIcon color="warning" sx={{ verticalAlign: 'middle' }} />
@@ -231,6 +245,7 @@ const Version = () => {
sx={{ ml: 2, textTransform: 'none' }} sx={{ ml: 2, textTransform: 'none' }}
variant="outlined" variant="outlined"
color="primary" color="primary"
size="small"
onClick={() => showFirmwareDialog(false)} onClick={() => showFirmwareDialog(false)}
> >
{isDev {isDev