新增氛围灯功能,对 EQ 名称长度做限制

This commit is contained in:
eafonyang
2026-06-30 15:28:53 +08:00
parent 98e8738e79
commit 8283ffcf14
18 changed files with 407 additions and 66 deletions
+13 -6
View File
@@ -1,5 +1,8 @@
import { X } from "lucide-react";
import type { PeqEqUi } from "../types";
import { PEQ_PRESET_NAME_MAX_LENGTH } from "../eqConstants";
import { clampPeqPresetName } from "../peqPresetName";
import { PeqPresetNameLengthHint } from "./PeqPresetNameLengthHint";
export function SaveBDialog({
open,
@@ -40,12 +43,16 @@ export function SaveBDialog({
</button>
</div>
<input
value={presetName}
onChange={(e) => onNameChange(e.target.value)}
className="h-11 w-full rounded-[10px] border border-white/12 bg-[#15171b] px-3 text-[15px] text-white/90 outline-none placeholder:text-white/30 focus:border-white/15"
autoFocus
/>
<div>
<input
value={presetName}
onChange={(e) => onNameChange(clampPeqPresetName(e.target.value))}
maxLength={PEQ_PRESET_NAME_MAX_LENGTH}
className="h-11 w-full rounded-[10px] border border-white/12 bg-[#15171b] px-3 text-[15px] text-white/90 outline-none placeholder:text-white/30 focus:border-white/15"
autoFocus
/>
<PeqPresetNameLengthHint value={presetName} />
</div>
<div className="mt-6 flex items-center justify-center gap-4 sm:gap-8">
<button