auto-formatting

This commit is contained in:
Proddy
2022-10-31 20:26:30 +01:00
parent 499456fa77
commit 036953044e
5 changed files with 10 additions and 10 deletions

View File

@@ -51,7 +51,7 @@ const useFileUpload = ({ upload }: MediaUploadOptions) => {
if (response.status === 200) { if (response.status === 200) {
enqueueSnackbar(LL.UPLOAD() + ' ' + LL.SUCCESSFUL(), { variant: 'success' }); enqueueSnackbar(LL.UPLOAD() + ' ' + LL.SUCCESSFUL(), { variant: 'success' });
} else if (response.status === 201) { } else if (response.status === 201) {
setMd5((String)(response.data)); setMd5(String(response.data));
enqueueSnackbar(LL.UPLOAD() + ' MD5 ' + LL.SUCCESSFUL(), { variant: 'success' }); enqueueSnackbar(LL.UPLOAD() + ' MD5 ' + LL.SUCCESSFUL(), { variant: 'success' });
} }
} catch (error) { } catch (error) {

View File

@@ -22,7 +22,6 @@ interface UploadFileProps {
} }
const GeneralFileUpload: FC<UploadFileProps> = ({ uploadGeneralFile }) => { const GeneralFileUpload: FC<UploadFileProps> = ({ uploadGeneralFile }) => {
const [uploadFile, cancelUpload, uploading, uploadProgress, md5] = useFileUpload({ upload: uploadGeneralFile }); const [uploadFile, cancelUpload, uploading, uploadProgress, md5] = useFileUpload({ upload: uploadGeneralFile });
const { enqueueSnackbar } = useSnackbar(); const { enqueueSnackbar } = useSnackbar();

View File

@@ -72,7 +72,6 @@ const SystemStatusForm: FC = () => {
version: response.data.name, version: response.data.name,
url: response.data.assets[1].browser_download_url, url: response.data.assets[1].browser_download_url,
changelog: response.data.assets[0].browser_download_url changelog: response.data.assets[0].browser_download_url
}); });
}); });
axios.get(VERSIONCHECK_DEV_ENDPOINT).then((response) => { axios.get(VERSIONCHECK_DEV_ENDPOINT).then((response) => {
@@ -308,7 +307,9 @@ const SystemStatusForm: FC = () => {
</ListItemAvatar> </ListItemAvatar>
<ListItemText <ListItemText
primary={LL.FLASH()} primary={LL.FLASH()}
secondary={formatNumber(data.flash_chip_size) + ' KB / ' + (data.flash_chip_speed / 1000000).toFixed(0) + ' MHz'} secondary={
formatNumber(data.flash_chip_size) + ' KB / ' + (data.flash_chip_speed / 1000000).toFixed(0) + ' MHz'
}
/> />
</ListItem> </ListItem>
<Divider variant="inset" component="li" /> <Divider variant="inset" component="li" />

View File

@@ -318,10 +318,10 @@ const SettingsApplication: FC = () => {
<MenuItem value={0x0f}>Time Module (0x0F)</MenuItem> <MenuItem value={0x0f}>Time Module (0x0F)</MenuItem>
<MenuItem value={0x48}>Gateway 1 (0x48)</MenuItem> <MenuItem value={0x48}>Gateway 1 (0x48)</MenuItem>
<MenuItem value={0x49}>Gateway 2 (0x49)</MenuItem> <MenuItem value={0x49}>Gateway 2 (0x49)</MenuItem>
<MenuItem value={0x4A}>Gateway 3 (0x4A)</MenuItem> <MenuItem value={0x4a}>Gateway 3 (0x4A)</MenuItem>
<MenuItem value={0x4B}>Gateway 4 (0x4B)</MenuItem> <MenuItem value={0x4b}>Gateway 4 (0x4B)</MenuItem>
<MenuItem value={0x4C}>Gateway 5 (0x4C)</MenuItem> <MenuItem value={0x4c}>Gateway 5 (0x4C)</MenuItem>
<MenuItem value={0x4D}>Gateway 7 (0x4D)</MenuItem> <MenuItem value={0x4d}>Gateway 7 (0x4D)</MenuItem>
</ValidatedTextField> </ValidatedTextField>
</Grid> </Grid>
</Grid> </Grid>

View File

@@ -511,8 +511,8 @@ const SettingsCustomization: FC = () => {
</ToggleButtonGroup> </ToggleButtonGroup>
</Cell> </Cell>
<Cell>{formatName(de)}</Cell> <Cell>{formatName(de)}</Cell>
<Cell>{!(de.m & DeviceEntityMask.DV_READONLY) && (formatValue(de.mi))}</Cell> <Cell>{!(de.m & DeviceEntityMask.DV_READONLY) && formatValue(de.mi)}</Cell>
<Cell>{!(de.m & DeviceEntityMask.DV_READONLY) && (formatValue(de.ma))}</Cell> <Cell>{!(de.m & DeviceEntityMask.DV_READONLY) && formatValue(de.ma)}</Cell>
<Cell>{formatValue(de.v)}</Cell> <Cell>{formatValue(de.v)}</Cell>
</Row> </Row>
))} ))}