Update project dependencies and configuration: Added ECharts for data visualization, integrated Terser for minification, and adjusted Vite configuration for production. Updated app title and ConnectScreen content to reflect new version. Enhanced EQPage with headphone model loading and frequency response chart rendering.
This commit is contained in:
@@ -24,6 +24,7 @@ import {
|
||||
ChevronDown,
|
||||
Zap,
|
||||
Wifi,
|
||||
Bluetooth,
|
||||
} from "lucide-react";
|
||||
import { useLocation } from "wouter";
|
||||
import { useRef, useState, useEffect, useCallback } from "react";
|
||||
@@ -110,17 +111,13 @@ export default function Home() {
|
||||
const vuLabel = `VU表${(ds.vu ?? 0) + 1}`;
|
||||
const bypassOn = (ds.dsp_enable ?? 0) === 0;
|
||||
|
||||
// Slider fill %
|
||||
const fillPct = localVol;
|
||||
// Slider fill % (0-200 → 0-100%)
|
||||
const fillPct = (localVol / 200) * 100;
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-black flex flex-col">
|
||||
{/* ── Top bar ── */}
|
||||
<div className="flex items-center justify-between px-4 pt-4 pb-2">
|
||||
<button className="flex items-center gap-1.5 text-white">
|
||||
<span className="text-[18px] font-bold tracking-tight">Luxsin X9</span>
|
||||
<ChevronDown size={16} className="text-white/50" />
|
||||
</button>
|
||||
<div className="flex items-center justify-end px-4 pt-4 pb-2">
|
||||
<button onClick={() => setLocation("/system")}
|
||||
className="w-9 h-9 rounded-full flex items-center justify-center text-white/60 active:text-white transition-colors"
|
||||
style={{ background: "rgba(44,44,46,0.6)" }}>
|
||||
@@ -195,9 +192,13 @@ export default function Home() {
|
||||
</button>
|
||||
|
||||
<div className="flex-1 relative flex items-center">
|
||||
{/* Track fill */}
|
||||
{/* Track fill - 根据按钮位置调整 */}
|
||||
<div className="absolute left-0 h-[4px] rounded-full pointer-events-none"
|
||||
style={{ width: `${fillPct}%`, background: "#00FFF6", boxShadow: "0 0 8px rgba(0,255,246,0.5)" }} />
|
||||
style={{
|
||||
width: `${fillPct}%`,
|
||||
background: "#00FFF6",
|
||||
boxShadow: "0 0 8px rgba(0,255,246,0.5)"
|
||||
}} />
|
||||
<input
|
||||
type="range" min={0} max={200} value={localVol}
|
||||
className="cyan-slider relative z-10"
|
||||
@@ -224,6 +225,47 @@ export default function Home() {
|
||||
{volToDB(localVol)}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{/* Bluetooth info */}
|
||||
{ds.bt_status !== 0 && (
|
||||
<div className="mt-3 px-3 py-3 text-center">
|
||||
<div className="flex items-center justify-center gap-1.5 mb-1">
|
||||
<Bluetooth size={14} className="text-[#00FFF6]" />
|
||||
<span className="text-[11px] text-white/50">{ds.bt_srcname}</span>
|
||||
</div>
|
||||
{ds.bt_title && (
|
||||
<p className="text-[13px] text-white font-medium truncate mb-2">
|
||||
{ds.bt_title}
|
||||
{ds.bt_artist && <span className="text-white/50"> - {ds.bt_artist}</span>}
|
||||
</p>
|
||||
)}
|
||||
{/* Playback controls */}
|
||||
<div className="flex items-center justify-center gap-4 mt-2">
|
||||
<button
|
||||
onClick={() => updateSetting({ bt_next: 0 })}
|
||||
className="w-10 h-10 rounded-full flex items-center justify-center transition-all active:scale-95"
|
||||
style={{ background: "rgba(0,255,246,0.15)", border: "1px solid rgba(0,255,246,0.3)" }}>
|
||||
<img src="/player/skip-forward.png" alt="上一首" className="w-5 h-5" />
|
||||
</button>
|
||||
<button
|
||||
onClick={() => updateSetting({ bt_play: 1 })}
|
||||
className="w-12 h-12 rounded-full flex items-center justify-center transition-all active:scale-95"
|
||||
style={{ background: "transparent", border: "1px solid rgba(0,255,246,0.5)", boxShadow: "0 0 12px rgba(0,255,246,0.4)" }}>
|
||||
<img
|
||||
src={ds.bt_status === 1 ? "/player/play.png" : "/player/pause.png"}
|
||||
alt={ds.bt_status === 1 ? "播放" : "暂停"}
|
||||
className="w-6 h-6"
|
||||
/>
|
||||
</button>
|
||||
<button
|
||||
onClick={() => updateSetting({ bt_next: 1 })}
|
||||
className="w-10 h-10 rounded-full flex items-center justify-center transition-all active:scale-95"
|
||||
style={{ background: "rgba(0,255,246,0.15)", border: "1px solid rgba(0,255,246,0.3)" }}>
|
||||
<img src="/player/skip-back.png" alt="下一首" className="w-5 h-5" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* ── 4 quick-action circle buttons ── */}
|
||||
|
||||
Reference in New Issue
Block a user