From 16bb8eb88bfd0567e38635c723abf5254e9576ef Mon Sep 17 00:00:00 2001 From: Mike Cousins Date: Tue, 19 Jun 2018 11:59:16 -0400 Subject: [PATCH] fix(app): Enable robot update even if API reports up-to-date (#1721) --- app/src/components/RobotSettings/InformationCard.js | 1 - app/src/components/RobotSettings/UpdateModal.js | 11 +++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/src/components/RobotSettings/InformationCard.js b/app/src/components/RobotSettings/InformationCard.js index 14d44e22c17..7d254ebf4e1 100644 --- a/app/src/components/RobotSettings/InformationCard.js +++ b/app/src/components/RobotSettings/InformationCard.js @@ -75,7 +75,6 @@ function InformationCard (props: Props) { {updateText} diff --git a/app/src/components/RobotSettings/UpdateModal.js b/app/src/components/RobotSettings/UpdateModal.js index 216a5a396ad..8f2ebcb3e8a 100644 --- a/app/src/components/RobotSettings/UpdateModal.js +++ b/app/src/components/RobotSettings/UpdateModal.js @@ -33,6 +33,7 @@ type DispatchProps = { type Props = StateProps & DispatchProps const UPDATE_MSG = "We recommend updating your robot's software to the latest version" +const ALREADY_UPDATED_MSG = "It looks like your robot is already up to date, but if you're experiencing issues you can re-apply the latest update." const RESTART_MSG = 'Restart your robot to finish the update. It may take several minutes for your robot to restart.' const DONE_MSG = 'Your robot has been updated. Please wait for your robot to fully restart, which may take several minutes.' @@ -49,8 +50,14 @@ function UpdateModal (props: Props) { let message let button + const heading = availableUpdate + ? `Version ${availableUpdate || ''} available` + : 'Robot is up to date' + if (!updateRequest.response) { - message = UPDATE_MSG + message = availableUpdate + ? UPDATE_MSG + : ALREADY_UPDATED_MSG button = inProgress ? {disabled: true, children: ()} : {onClick: update, children: 'update'} @@ -68,7 +75,7 @@ function UpdateModal (props: Props) { return (