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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user