From c1ba4514e61bcadefab4314d7e3d5b1bda0ad203 Mon Sep 17 00:00:00 2001 From: Kagetora Dev Runner Date: Wed, 17 Jun 2026 22:23:55 +0000 Subject: [PATCH] fix: address issue #482 (Ashigaru autonomous run) --- frontend/src/components/Sidebar.jsx | 272 +++++++++++++--------------- 1 file changed, 122 insertions(+), 150 deletions(-) diff --git a/frontend/src/components/Sidebar.jsx b/frontend/src/components/Sidebar.jsx index 9e09284a..747ba958 100644 --- a/frontend/src/components/Sidebar.jsx +++ b/frontend/src/components/Sidebar.jsx @@ -76,7 +76,6 @@ function Sidebar({ tourActive, poi, isLinearPoi, isNewPOI, newOrganization, isNe const [hasGauges, setHasGauges] = useState(null); const [servingTaxis, setServingTaxis] = useState([]); const [isSidebarExpanded, setIsSidebarExpanded] = useState(() => window.innerWidth < 768); - const [mobilePhotosVisible, setMobilePhotosVisible] = useState(false); const [hasNavigatedPoi, setHasNavigatedPoi] = useState(false); useEffect(() => { @@ -285,7 +284,6 @@ function Sidebar({ tourActive, poi, isLinearPoi, isNewPOI, newOrganization, isNe const shouldEnterEditMode = (isAdmin && editMode) || isNewPOI; setIsEditing(shouldEnterEditMode); setIsSidebarExpanded(isMobile); - setMobilePhotosVisible(false); // Respect a deep-linked subtab (e.g. /poi/river_levels) instead of forcing Info. if (!permalinkInfo && !initialSidebarTab) setSidebarTab('view'); } else { @@ -708,7 +706,7 @@ function Sidebar({ tourActive, poi, isLinearPoi, isNewPOI, newOrganization, isNe {isMobile && !isEditing && ( - ) : null - ) : ( + + ) : null} + + {isMobile && !isEditing && !permalinkInfo && onNavigate && poiNavigationList && poiNavigationList.length > 1 && media.length > 0 && ( <> - {isEditing && linearFeature?.id ? ( - - ) : media.length > 0 ? ( - - ) : user && linearFeature?.id && !mediaLoading ? ( -
- -
- ) : null} - - {isMobile && !isEditing && !permalinkInfo && onNavigate && poiNavigationList && poiNavigationList.length > 1 && media.length > 0 && ( - <> - {currentIndex > 0 && ( - - )} - {currentIndex < poiNavigationList.length - 1 && ( - - )} - + {currentIndex > 0 && ( + + )} + {currentIndex < poiNavigationList.length - 1 && ( + )} )} @@ -1038,7 +1023,7 @@ function Sidebar({ tourActive, poi, isLinearPoi, isNewPOI, newOrganization, isNe {isMobile && !isEditing && ( - ) : null - ) : ( - <> - {permalinkInfo && (sidebarTab === 'news' || sidebarTab === 'events') ? ( - permalinkItem ? ( - - ) : ( -
- ) - ) : isEditing && destination?.id ? ( - - ) : media.length > 0 ? ( - - ) : user && destination?.id && !mediaLoading ? ( -
- -
- ) : null} +
+ ) : null} - {isMobile && !isEditing && !permalinkInfo && onNavigate && poiNavigationList && poiNavigationList.length > 1 && media.length > 0 && ( - <> - {currentIndex > 0 && ( - - )} - {currentIndex < poiNavigationList.length - 1 && ( - - )} - + {isMobile && !isEditing && !permalinkInfo && onNavigate && poiNavigationList && poiNavigationList.length > 1 && media.length > 0 && ( + <> + {currentIndex > 0 && ( + + )} + {currentIndex < poiNavigationList.length - 1 && ( + )} )}