首页音量旋钮,不允许用户主动调节音量

This commit is contained in:
eafonyang
2026-07-23 17:40:27 +08:00
parent 0a216e1cc6
commit eb8b70773c
+4 -13
View File
@@ -588,26 +588,17 @@ export default function Home() {
<div className="pr-4"> <div className="pr-4">
<div <div
className={cn( className={cn(
"w-12 h-12 rounded-full flex items-center justify-center touch-none select-none", "w-12 h-12 rounded-full flex items-center justify-center select-none pointer-events-none",
volumeControlsLocked && "opacity-45 cursor-not-allowed", volumeControlsLocked && "opacity-45",
)} )}
style={{ style={{
background: "radial-gradient(circle at 35% 35%, #4a4a4e, #1a1a1c)", background: "radial-gradient(circle at 35% 35%, #4a4a4e, #1a1a1c)",
border: "2px solid rgba(255,255,255,0.12)", border: "2px solid rgba(255,255,255,0.12)",
boxShadow: "inset 0 2px 4px rgba(0,0,0,0.5)", boxShadow: "inset 0 2px 4px rgba(0,0,0,0.5)",
transform: `rotate(${knobAngle}deg)`, transform: `rotate(${knobAngle}deg)`,
transition: knobDraggingRef.current ? "none" : "transform 120ms ease-out", transition: "transform 120ms ease-out",
}} }}
role="slider" aria-hidden="true"
aria-label="Volume"
aria-valuemin={0}
aria-valuemax={200}
aria-valuenow={localVol}
onPointerDown={beginKnobDrag}
onPointerMove={moveKnobDrag}
onPointerUp={endKnobDrag}
onPointerCancel={endKnobDrag}
onLostPointerCapture={lostKnobPointerCapture}
> >
<div className="w-1 h-4 rounded-full bg-white/40" style={{ transform: "rotate(-30deg)", transformOrigin: "bottom center" }} /> <div className="w-1 h-4 rounded-full bg-white/40" style={{ transform: "rotate(-30deg)", transformOrigin: "bottom center" }} />
</div> </div>