Skip to content

Commit ffa4e25

Browse files
committed
Fix Client Performance Retry button not re-detecting IP (#597)
* Fix mobile nav bar getting stuck hidden on state change and client retry on IP change - Add ResizeObserver to force-show nav bar when content shrinks below scrollable - Change Client Performance Retry button to full page reload so HttpContext re-detects IP * Fix nav bar stuck hidden at top of page - clear auto-hide timer instead of starting it At scrollTop=0, the bar would show then auto-hide after 2s with no way to scroll further up to recover it. Now clears the timer so the bar stays visible at the top of the page. * Preserve initial auto-hide but prevent stuck nav on scroll-back-to-top Track hasScrolledDown flag so auto-hide at scrollTop=0 only fires on initial page load. Once the user scrolls down and back up, they're reaching for the nav - keep it visible. Reset flag on navigation. * Only set hasScrolledDown on real scroll-down hide, not on layout-shift events * Revert nav bar auto-hide changes - was a Blazor connection issue, not a scroll bug * Add Retry button to Device Offline banner
1 parent d13fa62 commit ffa4e25

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

src/NetworkOptimizer.Web/Components/Pages/ClientDashboard.razor

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
<strong>Device Offline</strong>
9191
<span>This device is currently offline. Showing historical data. Live data will appear when it reconnects.</span>
9292
</div>
93+
<button class="btn btn-primary btn-sm" @onclick="() => NavigationManager.NavigateTo(NavigationManager.Uri, forceLoad: true)">Retry</button>
9394
</div>
9495
</div>
9596
}
@@ -122,7 +123,7 @@
122123
<div class="card empty-state">
123124
<h3>Device Not Found</h3>
124125
<p>Could not identify your device on the network. Make sure you're connected and the UniFi Console is reachable.</p>
125-
<button class="btn btn-primary" @onclick="RetryIdentify">Retry</button>
126+
<button class="btn btn-primary" @onclick="() => NavigationManager.NavigateTo(NavigationManager.Uri, forceLoad: true)">Retry</button>
126127
</div>
127128
}
128129
else
@@ -1638,12 +1639,6 @@
16381639
return (from, to);
16391640
}
16401641

1641-
private async Task RetryIdentify()
1642-
{
1643-
await IdentifyAndLoadAsync();
1644-
StateHasChanged();
1645-
}
1646-
16471642
private void ToggleResultExpand(int resultId)
16481643
{
16491644
_expandedResultId = _expandedResultId == resultId ? null : resultId;

0 commit comments

Comments
 (0)