首页音量旋钮,不允许用户主动调节音量
This commit is contained in:
@@ -523,7 +523,7 @@ export function readBootSoundFromState(state: DeviceState | null | undefined): n
|
||||
// Mock data for demo/offline mode
|
||||
// ============================================================
|
||||
export const MOCK_DEVICE_STATE: DeviceState = {
|
||||
device: "Luxsin-X9",
|
||||
device: "Luxsin-B9",
|
||||
version: "1.2.3",
|
||||
mac: "AA:BB:CC:DD:EE:FF",
|
||||
language: 0,
|
||||
@@ -760,7 +760,7 @@ export async function fetchLuxsinAudioCurve(
|
||||
// Share Code API — shareCreate / shareList / shareQuery / shareAccept
|
||||
// ============================================================
|
||||
|
||||
const SHARE_DEVICE_MODELS = ["Luxsin-X9", "Luxsin-X8"] as const;
|
||||
const SHARE_DEVICE_MODELS = ["Luxsin-X9", "Luxsin-X8", "Luxsin-B9"] as const;
|
||||
|
||||
export type ShareDeviceModel = (typeof SHARE_DEVICE_MODELS)[number];
|
||||
|
||||
@@ -777,6 +777,7 @@ export function resolveShareDeviceModel(device: string): ShareDeviceModel | null
|
||||
const lower = trimmed.toLowerCase();
|
||||
if (lower.includes("x9")) return "Luxsin-X9";
|
||||
if (lower.includes("x8")) return "Luxsin-X8";
|
||||
if (lower.includes("b9")) return "Luxsin-B9";
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -608,25 +608,15 @@ export default function Home() {
|
||||
{/* Right knob */}
|
||||
<div className={cn("pr-4", volumePassthroughActive && "opacity-40 pointer-events-none")}>
|
||||
<div
|
||||
className="w-12 h-12 rounded-full flex items-center justify-center touch-none select-none"
|
||||
className="w-12 h-12 rounded-full flex items-center justify-center select-none pointer-events-none"
|
||||
style={{
|
||||
background: "radial-gradient(circle at 35% 35%, #4a4a4e, #1a1a1c)",
|
||||
border: "2px solid rgba(255,255,255,0.12)",
|
||||
boxShadow: "inset 0 2px 4px rgba(0,0,0,0.5)",
|
||||
transform: `rotate(${knobAngle}deg)`,
|
||||
transition: knobDraggingRef.current ? "none" : "transform 120ms ease-out",
|
||||
transition: "transform 120ms ease-out",
|
||||
}}
|
||||
role="slider"
|
||||
aria-label="Volume"
|
||||
aria-valuemin={0}
|
||||
aria-valuemax={200}
|
||||
aria-valuenow={localVol}
|
||||
aria-disabled={volumePassthroughActive}
|
||||
onPointerDown={beginKnobDrag}
|
||||
onPointerMove={moveKnobDrag}
|
||||
onPointerUp={endKnobDrag}
|
||||
onPointerCancel={endKnobDrag}
|
||||
onLostPointerCapture={lostKnobPointerCapture}
|
||||
aria-hidden="true"
|
||||
>
|
||||
<div className="w-1 h-4 rounded-full bg-white/40" style={{ transform: "rotate(-30deg)", transformOrigin: "bottom center" }} />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user