Small ui fixes on firmware updates (#1291)

This commit is contained in:
lucas lelievre authored and GitHub committed 2025-01-31 13:54:26 +01:00
1 parent 15ea04d7c9
commit fb23ba8522
5 files changed
+23 -8

No files matched your search

@@ -300,13 +300,21 @@ export function FirmwareUpdate() {
queueFlashing(selectedDevices);
};
const exit = () => {
clear();
navigate('/');
};
const canStartUpdate =
isValid &&
devices.length !== 0 &&
!hasPendingTrackers &&
trackerWithErrors.length === 0;
const canRetry =
isValid && devices.length !== 0 && trackerWithErrors.length !== 0;
!hasPendingTrackers &&
isValid &&
devices.length !== 0 &&
trackerWithErrors.length !== 0;
const statusKeys = Object.keys(status);
@@ -395,6 +403,13 @@ export function FirmwareUpdate() {
onClick={startUpdate}
></Button>
</Localized>
<Localized id="firmware_update-exit">
<Button
variant="primary"
onClick={exit}
disabled={hasPendingTrackers}
></Button>
</Localized>
</div>
</div>
</div>
@@ -141,7 +141,6 @@ export function TrackerCard({
}) {
const { currentFirmwareRelease } = useAppContext();
const { useVelocity } = useTracker(tracker);
const velocity = useVelocity();
return (