Refactor Vite configuration for improved chunking strategy and caching. Enhance DeviceContext with new upgradePeqChange method for PEQ updates. Update audio page to support localized labels and dynamic volume control. Introduce new filter types and improve EQPage functionality with enhanced frequency response visualization.

This commit is contained in:
yangy
2026-04-17 17:57:39 +08:00
parent 4246e8ce27
commit 0e7670c215
12 changed files with 1103 additions and 153 deletions
+15
View File
@@ -22,6 +22,9 @@ const KEY_TO_SETTING: Record<string, string> = {
language: "language",
analogGain: "analogGain",
soundStep: "soundStep",
filterCharacteristic: "pcm",
mutePolar: "hdmimutepolar",
IISMode: "hdmiType",
xlr: "xlr",
dacGain: "dacGain",
dacImpedance: "dacImpedance",
@@ -45,6 +48,15 @@ export let selectPageState: {
key: string;
} | null = null;
// Last select result for pages that need local state update
export let selectPageResult: { key: string; selected: number } | null = null;
export function consumeSelectPageResult() {
const result = selectPageResult;
selectPageResult = null;
return result;
}
// Helper function to set select page state
export function navigateToSelect(title: string, options: string[], selected: number, back: string, key: string) {
selectPageState = { title, options, selected, back, key };
@@ -75,6 +87,9 @@ export default function SelectPage() {
const { title, options, selected: selectedIdx, back, key } = state;
const handleSelect = (idx: number) => {
// Keep selection result for pages that handle non-api local updates (e.g. EQ filter type)
selectPageResult = { key, selected: idx };
// Apply setting if key maps to an API field
const apiField = KEY_TO_SETTING[key];
if (apiField) {