修复 bug

This commit is contained in:
eafonyang
2026-06-12 15:53:05 +08:00
parent 56ccb7b76a
commit 72d0872ced
9 changed files with 112 additions and 23 deletions
+15
View File
@@ -158,6 +158,21 @@ export function freqLabel(freq: unknown) {
return String(Math.round(hz));
}
/** Dev: log decoded syncPeq JSON after EQ page fetches device PEQ state. */
export function logEqSyncPeqDev(source: string, data: PeqState): void {
if (!import.meta.env.DEV) return;
console.log(`[EQ syncPeq] ${source}`, data);
}
export async function fetchEqSyncPeq(
api: { getPeqState: () => Promise<PeqState> },
source: string,
): Promise<PeqState> {
const data = await api.getPeqState();
logEqSyncPeqDev(source, data);
return data;
}
/* ── Build PEQ catalog sync key ── */
export function buildPeqCatalogSyncKey(
remote: Pick<PeqState, "peq" | "peqSelect"> | null | undefined,