优化体验,修复 bug
This commit is contained in:
@@ -25,7 +25,6 @@ import {
|
||||
type PeqChangePayload,
|
||||
type PeqState,
|
||||
buildPeqPresetBody,
|
||||
acceptShareCode,
|
||||
} from "@/lib/luxsinApi";
|
||||
import {
|
||||
getFilterType,
|
||||
@@ -719,16 +718,6 @@ export default function EQPage() {
|
||||
|
||||
skipPeqAutoSyncRef.current = true;
|
||||
try {
|
||||
const mac = deviceState?.mac ?? "";
|
||||
if (!isDemoMode && mac) {
|
||||
const acceptRes = await acceptShareCode(mac, shareCode.trim());
|
||||
if (acceptRes.code !== 200) {
|
||||
toast.error(eqUi.importFail ?? eqUi.importCodeNotFound);
|
||||
skipPeqAutoSyncRef.current = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
await upgradePeqChange(payload);
|
||||
if (api && !isDemoMode) {
|
||||
const latest = await fetchEqSyncPeq(api, "importSharedEq");
|
||||
@@ -1850,6 +1839,7 @@ export default function EQPage() {
|
||||
eqUi={eqUi}
|
||||
peqCardLabels={peqCardLabels}
|
||||
mac={deviceState?.mac ?? ""}
|
||||
isDemoMode={isDemoMode}
|
||||
onImportEq={handleImportSharedEq}
|
||||
/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user