From b620805e138ff4e0d30267355fa35d5f31e96ac5 Mon Sep 17 00:00:00 2001 From: eafonyang Date: Mon, 15 Jun 2026 13:38:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=86=E5=88=86=20EQ=20=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/pages/EQPage.tsx | 1991 ++--------------- .../pages/eq/components/AddPresetDialog.tsx | 115 + .../pages/eq/components/BandParamDialog.tsx | 89 + .../pages/eq/components/BatchEditDialog.tsx | 69 + .../src/pages/eq/components/BrandDrawer.tsx | 417 ++++ client/src/pages/eq/components/FreqChart.tsx | 442 ++++ .../src/pages/eq/components/SaveBDialog.tsx | 69 + .../src/pages/eq/components/ShareDialog.tsx | 512 +++++ client/src/pages/eq/hooks/useRawCurve.ts | 102 + 9 files changed, 1978 insertions(+), 1828 deletions(-) create mode 100644 client/src/pages/eq/components/AddPresetDialog.tsx create mode 100644 client/src/pages/eq/components/BandParamDialog.tsx create mode 100644 client/src/pages/eq/components/BatchEditDialog.tsx create mode 100644 client/src/pages/eq/components/BrandDrawer.tsx create mode 100644 client/src/pages/eq/components/FreqChart.tsx create mode 100644 client/src/pages/eq/components/SaveBDialog.tsx create mode 100644 client/src/pages/eq/components/ShareDialog.tsx create mode 100644 client/src/pages/eq/hooks/useRawCurve.ts diff --git a/client/src/pages/EQPage.tsx b/client/src/pages/EQPage.tsx index 95e47b2..fa9baae 100644 --- a/client/src/pages/EQPage.tsx +++ b/client/src/pages/EQPage.tsx @@ -11,38 +11,24 @@ 7. Total gain card: 总增益 value + AUTO toggle + slider ============================================================ */ import { useDevice } from "@/contexts/DeviceContext"; -import { ChevronLeft, ChevronDown, Minus, Plus, Edit3, Headphones, Search, X, Share2, Copy, Loader2 } from "lucide-react"; +import { ChevronLeft, ChevronDown, Minus, Plus, Edit3, Headphones, Share2 } from "lucide-react"; import { useLocation } from "wouter"; import { useState, useMemo, useEffect, useRef, useCallback } from "react"; import { cn } from "@/lib/utils"; -import { useStrokeDrawAnimation } from "@/lib/useStrokeDrawAnimation"; import BottomNav from "@/components/BottomNav"; import { FeatureGate } from "@/components/FeatureGate"; import { toast } from "sonner"; import { - decodeCustomBase64, - fetchLuxsinAudioBrands, fetchLuxsinAudioCurve, - fetchLuxsinAudioModelList, - fetchLuxsinAudioModels, - type LuxsinAudioBrand, - type LuxsinAudioModelListItem, - type LuxsinAudioModel, type PeqFilter, type PeqApplyPayload, type PeqChangePayload, type PeqPresetBody, type PeqState, } from "@/lib/luxsinApi"; -import * as echarts from "echarts"; import { - getSectionsMatrix, - visualizeResponse, - getChartOps, getFilterType, getFilterShortName, - buildPeqSvgCurveData, - sampleCombinedPeqMagnitudeDb, } from "@/lib/peqAudio"; import localeZh from "@/locales/data-zh.json"; import localeZhHK from "@/locales/data-zh-HK.json"; @@ -59,12 +45,10 @@ import { DEFAULT_BANDS, FLAT_PRESET_FILTERS, PEQ_PRESET_MAX, - CATALOG_TARGETS, type BandParamKind, type PeqEqUi, type PeqCatalogItem, type PeqPresetLocalCache, - type CatalogTarget, } from "./eq/constants"; import { eqInterp, @@ -83,447 +67,18 @@ import { } from "./eq/utils"; import { IOSToggle } from "./eq/components/IOSToggle"; import { CyanSlider } from "./eq/components/CyanSlider"; - - - -function LegendCurveIndicator({ - loading, - color, -}: { - loading: boolean; - color: string; -}) { - if (loading) { - return ( -