From 742a3fcafedea7559d6dbf566a0decea0ae160f3 Mon Sep 17 00:00:00 2001 From: lucas lelievre Date: Fri, 5 Dec 2025 18:17:51 +0100 Subject: [PATCH] Small UI fixes (#1641) --- gui/public/i18n/en/translation.ftl | 12 +- .../firmware-tool/steps/FlashBtnStep.tsx | 8 +- .../components/tracker/TrackerSettings.tsx | 142 ++++++++++-------- 3 files changed, 87 insertions(+), 75 deletions(-) diff --git a/gui/public/i18n/en/translation.ftl b/gui/public/i18n/en/translation.ftl index 39863a07b..7579ace15 100644 --- a/gui/public/i18n/en/translation.ftl +++ b/gui/public/i18n/en/translation.ftl @@ -402,9 +402,11 @@ tracker-settings-update-incompatible = Cannot update. Incompatible board tracker-settings-update-low-battery = Cannot update. Battery lower than 50% tracker-settings-update-up_to_date = Up to date tracker-settings-update-blocked = Update not available. No other releases available -tracker-settings-update-available = { $versionName } is now available tracker-settings-update = Update now tracker-settings-update-title = Firmware version +tracker-settings-current-version = Current +tracker-settings-latest-version = Latest + ## Tracker part card info tracker-part_card-no_name = No name @@ -1412,13 +1414,13 @@ firmware_tool-flash_method_step-serial-v2 = .description = Use a USB cable to update your tracker. -firmware_tool-flashbtn_step = Press the boot btn +firmware_tool-flashbtn_step = Press the boot button firmware_tool-flashbtn_step-description = Before going to the next step, there are a few things you need to do firmware_tool-flashbtn_step-board_SLIMEVR = Turn off the tracker, remove the case (if any), connect the USB cable to your computer, then follow the appropriate steps for your SlimeVR board revision: -firmware_tool-flashbtn_step-board_SLIMEVR-r11 = Turn on the tracker while shorting the second rectangular FLASH pad from the edge on the top side of the board to the metal shield of the microcontroller. -firmware_tool-flashbtn_step-board_SLIMEVR-r12 = Turn on the tracker while shorting the circular FLASH pad on the top side of the board to the metal shield of the microcontroller. -firmware_tool-flashbtn_step-board_SLIMEVR-r14 = Turn on the tracker while pushing in the FLASH button on the top side of the board. +firmware_tool-flashbtn_step-board_SLIMEVR-r11-v2 = Turn on the tracker while shorting the second rectangular FLASH pad from the edge on the top side of the board to the metal shield of the microcontroller. The tracker LED should do a short blink. +firmware_tool-flashbtn_step-board_SLIMEVR-r12-v2 = Turn on the tracker while shorting the circular FLASH pad on the top side of the board to the metal shield of the microcontroller. The tracker LED should do a short blink. +firmware_tool-flashbtn_step-board_SLIMEVR-r14-v2 = Turn on the tracker while pushing in the FLASH button on the top side of the board. The tracker LED should do a short blink. firmware_tool-flashbtn_step-board_OTHER = Before flashing, you will probably need to put the tracker into bootloader mode. Most of the time, this means pressing the boot button on the board before the flashing process starts. diff --git a/gui/src/components/firmware-tool/steps/FlashBtnStep.tsx b/gui/src/components/firmware-tool/steps/FlashBtnStep.tsx index fdbe33be7..cfb237852 100644 --- a/gui/src/components/firmware-tool/steps/FlashBtnStep.tsx +++ b/gui/src/components/firmware-tool/steps/FlashBtnStep.tsx @@ -21,7 +21,7 @@ export function FlashBtnStep({ {selectedSource?.source.board === 'BOARD_SLIMEVR' || selectedSource?.source.board === 'BOARD_SLIMEVR_V1_2' ? ( <> - + {l10n.getString('firmware_tool-flashbtn_step-board_SLIMEVR')}
@@ -29,7 +29,7 @@ export function FlashBtnStep({ R11 {l10n.getString( - 'firmware_tool-flashbtn_step-board_SLIMEVR-r11' + 'firmware_tool-flashbtn_step-board_SLIMEVR-r11-v2' )} @@ -38,7 +38,7 @@ export function FlashBtnStep({ R12 {l10n.getString( - 'firmware_tool-flashbtn_step-board_SLIMEVR-r12' + 'firmware_tool-flashbtn_step-board_SLIMEVR-r12-v2' )} @@ -48,7 +48,7 @@ export function FlashBtnStep({ R14 {l10n.getString( - 'firmware_tool-flashbtn_step-board_SLIMEVR-r14' + 'firmware_tool-flashbtn_step-board_SLIMEVR-r14-v2' )} diff --git a/gui/src/components/tracker/TrackerSettings.tsx b/gui/src/components/tracker/TrackerSettings.tsx index c9ead9a7f..019704f94 100644 --- a/gui/src/components/tracker/TrackerSettings.tsx +++ b/gui/src/components/tracker/TrackerSettings.tsx @@ -1,4 +1,4 @@ -import { Localized, useLocalization } from '@fluent/react'; +import { useLocalization } from '@fluent/react'; import classNames from 'classnames'; import { IPv4 } from 'ip-num'; import { useEffect, useMemo, useState } from 'react'; @@ -39,6 +39,7 @@ import { MagnetometerToggleSetting } from '@/components/settings/pages/Magnetome import { useSetAtom } from 'jotai'; import { ignoredTrackersAtom } from '@/store/app-store'; import { checkForUpdate } from '@/hooks/firmware-update'; +import { Tooltip } from '@/components/commons/Tooltip'; const rotationsLabels: [Quaternion, string][] = [ [rotationToQuatMap.BACK, 'tracker-rotation-back'], @@ -200,75 +201,84 @@ export function TrackerSettingsPage() { )} {
- - - Firmware version - - -
- - v{tracker?.device?.hardwareInfo?.firmwareVersion} - - - - {updateUnavailable && ( - - No releases found - - )} - {!updateUnavailable && ( - <> - {needUpdate === 'unavailable' && ( - - - Cannot be updated, Incompatible board + + Firmware version + +
+
+ + + v{tracker?.device?.hardwareInfo?.firmwareVersion} + +
+
+ + {!updateUnavailable && ( + <> + {currentFirmwareRelease && ( + + {currentFirmwareRelease.name} - - )} - {needUpdate === 'blocked' && ( - // This happens only if no update is available and or the user is not in the current stagged - - - Update not available. No other releases available - - - )} - {needUpdate === 'updated' && ( - - Up to date - - )} - {needUpdate === 'can-update' && currentFirmwareRelease && ( - - - New version available - - - )} - {needUpdate === 'low-battery' && currentFirmwareRelease && ( - - - - )} - - )} + )} + + )} + {updateUnavailable && ( + + No releases found + + )} +
- - - +
}