新增 undo 功能

This commit is contained in:
eafonyang
2026-08-14 16:40:47 +08:00
parent 4a67622d9b
commit 8ca8128e2b
4 changed files with 23 additions and 20 deletions
+2 -6
View File
@@ -87,7 +87,6 @@ import { ShareDialog } from "./eq/components/ShareDialog";
import { BrandDrawer } from "./eq/components/BrandDrawer";
import { PeqOverwriteConfirmDialog } from "./eq/components/PeqOverwriteConfirmDialog";
import { PeqPresetManageDialog } from "./eq/components/PeqPresetManageDialog";
import { PeqUndoButton } from "./eq/components/PeqUndoButton";
import { useRawCurve } from "./eq/hooks/useRawCurve";
import {
usePeqUndoHistory,
@@ -1795,11 +1794,6 @@ export default function EQPage() {
)}
</div>
<div className="flex shrink-0 items-center gap-2">
<PeqUndoButton
disabled={!canUndo}
label={eqUi.undo ?? "Undo"}
onClick={handleUndo}
/>
<button
className="w-9 h-9 rounded-full flex items-center justify-center text-white/60 active:text-white transition-colors"
style={{
@@ -1844,6 +1838,8 @@ export default function EQPage() {
abMode={abMode}
onAbToggle={handleAbToggle}
onCopyAndSwitchTo={handleCopyAndSwitchTo}
canUndo={canUndo}
onUndo={handleUndo}
onApplyB={() => void handleApplyB()}
onSaveB={openSaveBDialog}
onBandDrag={(idx, patch) =>