remove all values

This commit is contained in:
proddy
2024-10-22 12:13:44 +02:00
parent 4e8771ead2
commit 10cffd5c6f

View File

@@ -51,19 +51,19 @@ const Help = () => {
} }
}); });
const { send: sendExportAllValues } = useRequest( // const { send: sendExportAllValues } = useRequest(
() => callAction({ action: 'export', param: 'allvalues' }), // () => callAction({ action: 'export', param: 'allvalues' }),
{ // {
immediate: false // immediate: false
} // }
) // )
.onSuccess((event) => { // .onSuccess((event) => {
saveFile(event.data, 'allvalues', '.txt'); // saveFile(event.data, 'allvalues', '.txt');
toast.info(LL.DOWNLOAD_SUCCESSFUL()); // toast.info(LL.DOWNLOAD_SUCCESSFUL());
}) // })
.onError((error) => { // .onError((error) => {
toast.error(error.message); // toast.error(error.message);
}); // });
const { send: sendAPI } = useRequest((data: APIcall) => API(data), { const { send: sendAPI } = useRequest((data: APIcall) => API(data), {
immediate: false immediate: false
@@ -162,11 +162,11 @@ const Help = () => {
color="primary" color="primary"
onClick={() => sendAPI({ device: 'system', cmd: 'info', id: 0 })} onClick={() => sendAPI({ device: 'system', cmd: 'info', id: 0 })}
> >
{LL.DOWNLOAD(1)} {LL.SUPPORT_INFORMATION(0)} {LL.SUPPORT_INFORMATION(0)}
</Button> </Button>
</Box> </Box>
<Button {/* <Button
sx={{ ml: 2 }} sx={{ ml: 2 }}
startIcon={<DownloadIcon />} startIcon={<DownloadIcon />}
variant="outlined" variant="outlined"
@@ -174,7 +174,7 @@ const Help = () => {
onClick={() => sendExportAllValues()} onClick={() => sendExportAllValues()}
> >
{LL.DOWNLOAD(1)}&nbsp;{LL.ALLVALUES()} {LL.DOWNLOAD(1)}&nbsp;{LL.ALLVALUES()}
</Button> </Button> */}
<Divider sx={{ mt: 4 }} /> <Divider sx={{ mt: 4 }} />