FIX: chỉnh sửa UX volume của master strip

This commit is contained in:
2026-07-30 15:22:47 +07:00
parent dc7ec3af4c
commit 19f02a5a49
2 changed files with 11 additions and 5 deletions
+10 -4
View File
@@ -936,7 +936,7 @@ const MasterStripConsole = ({ masterVolume, setMasterVolume, showMasteringModal,
onPointerDown: handlePanPointerDown, onPointerDown: handlePanPointerDown,
onPointerMove: handlePanPointerMove, onPointerMove: handlePanPointerMove,
onPointerUp: handlePanPointerUp, onPointerUp: handlePanPointerUp,
onDoubleClick: function() { setPan(0); if (panPointerRef.current) panPointerRef.current.style.transform = 'rotate(0deg)'; } onDoubleClick: function() { setPan(0); setPanText('center'); if (panPointerRef.current) panPointerRef.current.style.transform = 'rotate(0deg)'; }
}, React.createElement("div", { }, React.createElement("div", {
ref: panPointerRef, ref: panPointerRef,
id: "panPointer", id: "panPointer",
@@ -946,7 +946,7 @@ const MasterStripConsole = ({ masterVolume, setMasterVolume, showMasteringModal,
React.createElement("span", { className: "text-[8px] font-mono text-slate-500 w-5 text-left" }, React.createElement("span", { className: "text-[8px] font-mono text-slate-500 w-5 text-left" },
pan > 0 ? 'R' + Math.round(pan * 100) : '' pan > 0 ? 'R' + Math.round(pan * 100) : ''
), ),
React.createElement("span", { ref: React.createRef ? null : null, className: "text-[10px] font-bold font-mono text-slate-200 ml-8" }, React.createElement("span", { ref: React.createRef ? null : null, className: "text-[10px] font-bold font-mono text-slate-200 ml-8", onDoubleClick: function() { handleFaderChange(0); } },
masterVolume <= -50 ? '-inf' : (masterVolume > 0 ? '+' : '') + masterVolume.toFixed(1) masterVolume <= -50 ? '-inf' : (masterVolume > 0 ? '+' : '') + masterVolume.toFixed(1)
) )
) )
@@ -978,7 +978,12 @@ const MasterStripConsole = ({ masterVolume, setMasterVolume, showMasteringModal,
), ),
React.createElement("div", { className: "w-16 flex items-stretch gap-1 bg-slate-900/60 p-1 rounded border border-slate-800" }, React.createElement("div", { className: "w-16 flex items-stretch gap-1 bg-slate-900/60 p-1 rounded border border-slate-800" },
React.createElement("div", { React.createElement("div", {
className: "flex-1 flex flex-col items-center justify-center relative fader-track rounded" className: "flex-1 flex flex-col items-center justify-center relative fader-track rounded",
onWheel: function(e) {
e.preventDefault();
var delta = e.deltaY > 0 ? -0.5 : 0.5;
handleFaderChange(Math.max(-60, Math.min(12, masterVolume + delta)));
}
}, },
React.createElement("div", { className: "w-0.5 flex-1 bg-slate-700 absolute" }), React.createElement("div", { className: "w-0.5 flex-1 bg-slate-700 absolute" }),
React.createElement("input", { React.createElement("input", {
@@ -990,7 +995,8 @@ const MasterStripConsole = ({ masterVolume, setMasterVolume, showMasteringModal,
value: masterVolume, value: masterVolume,
className: "fader-slider w-full z-10", className: "fader-slider w-full z-10",
orient: "vertical", orient: "vertical",
onChange: function(e) { handleFaderChange(parseFloat(e.target.value)); } onChange: function(e) { handleFaderChange(parseFloat(e.target.value)); },
onDoubleClick: function() { handleFaderChange(0); }
}) })
), ),
React.createElement("div", { className: "relative w-5 text-[7px] font-mono text-slate-500 select-none overflow-hidden" }, React.createElement("div", { className: "relative w-5 text-[7px] font-mono text-slate-500 select-none overflow-hidden" },
File diff suppressed because one or more lines are too long