From 22ec4bb710aa46a1d62e70c80568bf0804909819 Mon Sep 17 00:00:00 2001 From: yangy Date: Wed, 29 Apr 2026 17:56:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=A4=BE=E5=8C=BA=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E8=B7=AF=E7=94=B1=EF=BC=8C=E6=9B=B4=E6=96=B0=E5=BA=95?= =?UTF-8?q?=E9=83=A8=E5=AF=BC=E8=88=AA=E4=BB=A5=E7=A7=BB=E9=99=A4=E5=8D=A0?= =?UTF-8?q?=E4=BD=8D=E7=AC=A6=EF=BC=8C=E4=BC=98=E5=8C=96=E9=9F=B3=E9=87=8F?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=E6=8C=89=E9=92=AE=E6=A0=B7=E5=BC=8F=E5=92=8C?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/App.tsx | 2 ++ client/src/components/BottomNav.tsx | 5 ++- client/src/pages/CommunityPage.tsx | 32 +++++++++++++++++++ client/src/pages/EQPage.tsx | 6 ---- client/src/pages/Home.tsx | 48 +++++++++++++++++++++++++++-- 5 files changed, 82 insertions(+), 11 deletions(-) create mode 100644 client/src/pages/CommunityPage.tsx diff --git a/client/src/App.tsx b/client/src/App.tsx index a007891..895dabf 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -18,6 +18,7 @@ import IOPage from "./pages/IOPage"; import VUPage from "./pages/VUPage"; import SelectPage from "./pages/SelectPage"; import AIPage from "./pages/AIPage"; +import CommunityPage from "./pages/CommunityPage"; function AppRouter() { return ( @@ -35,6 +36,7 @@ function AppRouter() { + diff --git a/client/src/components/BottomNav.tsx b/client/src/components/BottomNav.tsx index c3bf0bc..34f4e85 100644 --- a/client/src/components/BottomNav.tsx +++ b/client/src/components/BottomNav.tsx @@ -19,11 +19,10 @@ interface NavItem { path: string; icon: React.ComponentType<{ size?: number; className?: string }>; label: string; - placeholder?: boolean; } const NAV_ITEMS: NavItem[] = [ - { path: "/community", icon: MessageSquare, label: "社区", placeholder: true }, + { path: "/community", icon: MessageSquare, label: "社区" }, { path: "/eq", icon: Sliders, label: "HP-EQ" }, { path: "/", icon: Home, label: "主页" }, { path: "/effects", icon: Activity, label: "Effect" }, @@ -53,7 +52,7 @@ export default function BottomNav() { const Icon = item.icon; return ( - +
{/* Active indicator bar */}
+
+
+
+ +
+

Coming Soon

+

Community features are under development

+
+ +
+ +
+ ); +} diff --git a/client/src/pages/EQPage.tsx b/client/src/pages/EQPage.tsx index eff4d1d..1860c54 100644 --- a/client/src/pages/EQPage.tsx +++ b/client/src/pages/EQPage.tsx @@ -289,12 +289,6 @@ function FreqChart({ onClick={() => toast.info("已复制到 B")}> 复制到 B -
-
{/* SVG chart */} diff --git a/client/src/pages/Home.tsx b/client/src/pages/Home.tsx index 10c2e96..22363ef 100644 --- a/client/src/pages/Home.tsx +++ b/client/src/pages/Home.tsx @@ -46,7 +46,7 @@ type HomeLocale = NonNullable<(typeof localeZh)["home"]>; // ── Volume in dB (0-200 → -100dB to 0dB) ── function volToDB(v: number) { - if (v === 0) return "-∞"; + if (v === 0) return "-100dB"; const db = (v - 200) / 2; return `${db >= 0 ? "+" : ""}${db.toFixed(1)}dB`; } @@ -165,6 +165,12 @@ export default function Home() { const vuLabel = `${homeText.vu ?? "VU表"}${(ds.vu ?? 0) + 1}`; const bypassOn = (ds.dsp_enable ?? 0) === 0; + // Home 的 volume 取值为 0..200,对应 dB = (v - 200) / 2 + // 因此 1 个 volume 单位 = 0.5dB + // AudioPage 的 soundStep:0->0.5dB, 1->1dB, 2->2dB, 3->3dB + // 换算为 volume 单位:0.5/1/2/3 dB -> 1/2/4/6 + const fineVolumeStep = [1, 2, 4, 6][ds.soundStep ?? 1] ?? 1; + // Slider fill % (0-200 → 0-100%) const fillPct = (localVol / 200) * 100; // Knob angle (map 0..200 -> -135..+135 degrees) @@ -369,10 +375,48 @@ export default function Home() {
{/* dB value */} -
+
+ + {volToDB(localVol)} + +
{/* Bluetooth info */}