From c639c7738335111c2e067ec2f08379281470b534 Mon Sep 17 00:00:00 2001 From: yangy Date: Tue, 12 May 2026 15:13:20 +0800 Subject: [PATCH] Implement community forum integration in CommunityPage; update BottomNav to conditionally display community tab based on screen size. Add new audio processing function for combined PEQ magnitude calculation in peqAudio. --- client/src/components/BottomNav.tsx | 24 +++++++++++++++++++++++- client/src/lib/peqAudio.ts | 20 ++++++++++++++++++++ client/src/pages/CommunityPage.tsx | 29 ++++++++++------------------- client/src/pages/EQPage.tsx | 21 +++++++++++++++------ 4 files changed, 68 insertions(+), 26 deletions(-) diff --git a/client/src/components/BottomNav.tsx b/client/src/components/BottomNav.tsx index 603e93c..a2c8c93 100644 --- a/client/src/components/BottomNav.tsx +++ b/client/src/components/BottomNav.tsx @@ -2,6 +2,7 @@ BOTTOM NAV — Luxsin X9 Controller (Mobile) Design: iOS/Android App-style bottom tab bar 5 tabs — labels from locales/bottomNav, language = deviceState.language (同系统页) + - 社区:仅桌面宽屏(lg ≥1024px)显示,手机等小屏隐藏 - Active tab: cyan icon + top indicator bar - Inactive: muted icon + label ============================================================ */ @@ -30,6 +31,8 @@ interface NavItem { labelKey: keyof BottomNavLocale; } +const FORUM_URL = "https://forum.zidoo.tv/index.php"; + const NAV_ITEMS: NavItem[] = [ { path: "/community", icon: MessageSquare, labelKey: "community" }, { path: "/eq", icon: Sliders, labelKey: "hpEq" }, @@ -51,6 +54,12 @@ export default function BottomNav() { return (pack.bottomNav ?? localeZh.bottomNav) as BottomNavLocale; }, [deviceState?.language]); + /** 社区入口仅在桌面级视口显示(与 useIsLgUp / Tailwind lg 一致) */ + const visibleNavItems = useMemo( + () => NAV_ITEMS.filter((item) => item.path !== "/community" || isLgUp), + [isLgUp], + ); + return (