新增氛围灯功能,对 EQ 名称长度做限制
This commit is contained in:
@@ -42,6 +42,7 @@ import { BrandDrawer } from "./eq/components/BrandDrawer";
|
||||
import { PeqOverwriteConfirmDialog } from "./eq/components/PeqOverwriteConfirmDialog";
|
||||
import { PeqPresetManageDialog } from "./eq/components/PeqPresetManageDialog";
|
||||
import { useRawCurve } from "./eq/hooks/useRawCurve";
|
||||
import { isPeqPresetNameTooLong } from "./eq/peqPresetName";
|
||||
import {
|
||||
BAND_FREQ_MAX,
|
||||
BAND_FREQ_MIN,
|
||||
@@ -597,6 +598,10 @@ export default function EQPage() {
|
||||
toast.error(eqUi.addPresetNameEmpty);
|
||||
return;
|
||||
}
|
||||
if (isPeqPresetNameTooLong(nextName)) {
|
||||
toast.error(eqUi.addPresetNameTooLong);
|
||||
return;
|
||||
}
|
||||
if (headphoneModels.includes(nextName)) {
|
||||
toast.error(eqUi.addPresetNameExists);
|
||||
return;
|
||||
@@ -675,6 +680,10 @@ export default function EQPage() {
|
||||
toast.error(eqUi.addPresetNameEmpty);
|
||||
return;
|
||||
}
|
||||
if (isPeqPresetNameTooLong(nextName)) {
|
||||
toast.error(eqUi.addPresetNameTooLong);
|
||||
return;
|
||||
}
|
||||
if (headphoneModels.includes(nextName)) {
|
||||
toast.error(eqUi.addPresetNameExists);
|
||||
return;
|
||||
@@ -747,6 +756,10 @@ export default function EQPage() {
|
||||
toast.error(eqUi.addPresetNameEmpty);
|
||||
return;
|
||||
}
|
||||
if (isPeqPresetNameTooLong(nextName)) {
|
||||
toast.error(eqUi.addPresetNameTooLong);
|
||||
return;
|
||||
}
|
||||
if (!shareCode.trim()) {
|
||||
toast.error(eqUi.importCodeNotFound);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user