Add a button to refresh the list of updates

This commit is contained in:
Pierre HUBERT 2024-10-08 22:27:23 +02:00
parent 138dd6c6b8
commit e4da44b5ce

View File

@ -1,6 +1,7 @@
import DeleteIcon from "@mui/icons-material/Delete"; import DeleteIcon from "@mui/icons-material/Delete";
import DownloadIcon from "@mui/icons-material/Download"; import DownloadIcon from "@mui/icons-material/Download";
import FileUploadIcon from "@mui/icons-material/FileUpload"; import FileUploadIcon from "@mui/icons-material/FileUpload";
import RefreshIcon from "@mui/icons-material/Refresh";
import { import {
IconButton, IconButton,
Paper, Paper,
@ -65,13 +66,18 @@ function _OTARoute(p: { platforms: Array<string> }): React.ReactElement {
<SolarEnergyRouteContainer <SolarEnergyRouteContainer
label="OTA" label="OTA"
actions={ actions={
<> <span>
<Tooltip title="Refresh the list of updates">
<IconButton onClick={reload}>
<RefreshIcon />
</IconButton>
</Tooltip>
<Tooltip title="Upload a new update"> <Tooltip title="Upload a new update">
<IconButton onClick={() => setShowUploadDialog(true)}> <IconButton onClick={() => setShowUploadDialog(true)}>
<FileUploadIcon /> <FileUploadIcon />
</IconButton> </IconButton>
</Tooltip> </Tooltip>
</> </span>
} }
> >
{showUploadDialog && ( {showUploadDialog && (