mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-22 13:10:29 +00:00
fix(tours): refresh the wanderer watch after a fixed token and truly disable its switch offline
The watch row only re-read its state when the connection came or went, so after a passing connection test or a newly saved token it kept saying "Token refused" until a reload. The connection card now hands it a key built from the saved connection and its last check, and the row re-reads the watch whenever that changes. Without a connection the switch was only dimmed: the button stayed in the tab order and was announced as active. ToggleSwitch gains a disabled prop that disables the button and marks it aria-disabled, and the reason stays reachable through a focusable wrapper carrying the tooltip.
This commit is contained in:
@@ -140,7 +140,7 @@ export default function WandererConnectionSection(): React.ReactElement {
|
||||
</div>
|
||||
)}
|
||||
|
||||
<WandererWatchRow connected={S.connected} />
|
||||
<WandererWatchRow refreshKey={S.checkKey} />
|
||||
</Section>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user