From 6ea8c0d40ea33b8c5d16927d51f53d0dce8ce37b Mon Sep 17 00:00:00 2001 From: Gigi Date: Mon, 13 Oct 2025 08:53:17 +0200 Subject: [PATCH] feat: make relay status indicator smaller and hide on scroll - Reduce overall size of indicator on desktop (smaller padding, font sizes) - On mobile, match size with sidebar toggle buttons (var(--min-touch-target)) - Auto-collapse on mobile (collapsed by default, tap to expand) - Hide when scrolling down on mobile, show when scrolling up - Match behavior of other mobile UI controls for consistency --- src/components/RelayStatusIndicator.tsx | 8 ++++-- src/components/ThreePaneLayout.tsx | 5 +++- src/index.css | 38 +++++++++++++++++-------- 3 files changed, 36 insertions(+), 15 deletions(-) diff --git a/src/components/RelayStatusIndicator.tsx b/src/components/RelayStatusIndicator.tsx index ddc8e13c..4e27efae 100644 --- a/src/components/RelayStatusIndicator.tsx +++ b/src/components/RelayStatusIndicator.tsx @@ -8,9 +8,13 @@ import { useIsMobile } from '../hooks/useMediaQuery' interface RelayStatusIndicatorProps { relayPool: RelayPool | null + showOnMobile?: boolean // Control visibility based on scroll } -export const RelayStatusIndicator: React.FC = ({ relayPool }) => { +export const RelayStatusIndicator: React.FC = ({ + relayPool, + showOnMobile = true +}) => { // Poll frequently for responsive offline indicator (5s instead of default 20s) const relayStatuses = useRelayStatus({ relayPool, pollingInterval: 5000 }) const [isConnecting, setIsConnecting] = useState(true) @@ -70,7 +74,7 @@ export const RelayStatusIndicator: React.FC = ({ rela return (
= (props) => { highlightColor={props.settings.highlightColorMine || '#ffff00'} /> )} - + {props.toastMessage && (