Update logo and enhance layout responsiveness; add stroke animation for frequency chart paths
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 817 B After Width: | Height: | Size: 1.1 KiB |
@@ -27,13 +27,19 @@ export default function ConnectScreen() {
|
|||||||
<div className="min-h-screen bg-black flex flex-col items-center justify-center px-6">
|
<div className="min-h-screen bg-black flex flex-col items-center justify-center px-6">
|
||||||
{/* Logo / Brand */}
|
{/* Logo / Brand */}
|
||||||
<div className="mb-10 flex flex-col items-center">
|
<div className="mb-10 flex flex-col items-center">
|
||||||
<img
|
<div
|
||||||
src={`${import.meta.env.BASE_URL}logo.png`}
|
className="mb-4 flex size-[5.5rem] shrink-0 items-center justify-center rounded-[17px] border border-white/15 bg-white/[0.02]"
|
||||||
alt="Luxsin"
|
>
|
||||||
className="mb-4 h-auto w-20 object-contain"
|
<img
|
||||||
/>
|
src={`${import.meta.env.BASE_URL}logo.png`}
|
||||||
<h1 className="text-[30px] font-bold text-white tracking-tight">Luxsin X8</h1>
|
alt="Luxsin"
|
||||||
<p className="text-[14px] text-white/35 mt-1 tracking-wide">Controller</p>
|
className="h-auto max-h-[3.75rem] w-auto max-w-[3.75rem] object-contain"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<h1 className="text-[16px] font-semibold tracking-tight text-white/70">
|
||||||
|
Luxsin X8 Controller
|
||||||
|
</h1>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Connection card */}
|
{/* Connection card */}
|
||||||
@@ -58,7 +64,7 @@ export default function ConnectScreen() {
|
|||||||
style={{
|
style={{
|
||||||
background: "rgba(44,44,46,0.8)",
|
background: "rgba(44,44,46,0.8)",
|
||||||
border: "1px solid rgba(255,255,255,0.08)",
|
border: "1px solid rgba(255,255,255,0.08)",
|
||||||
fontFamily: "'JetBrains Mono', monospace",
|
fontFamily: "inherit",
|
||||||
}}
|
}}
|
||||||
onFocus={(e) => { e.target.style.borderColor = "rgba(0,255,246,0.4)"; e.target.style.boxShadow = "0 0 0 3px rgba(0,255,246,0.06)"; }}
|
onFocus={(e) => { e.target.style.borderColor = "rgba(0,255,246,0.4)"; e.target.style.boxShadow = "0 0 0 3px rgba(0,255,246,0.06)"; }}
|
||||||
onBlur={(e) => { e.target.style.borderColor = "rgba(255,255,255,0.08)"; e.target.style.boxShadow = "none"; }}
|
onBlur={(e) => { e.target.style.borderColor = "rgba(255,255,255,0.08)"; e.target.style.boxShadow = "none"; }}
|
||||||
|
|||||||
@@ -16,21 +16,24 @@ interface LayoutProps {
|
|||||||
|
|
||||||
export default function Layout({ children, title, subtitle }: LayoutProps) {
|
export default function Layout({ children, title, subtitle }: LayoutProps) {
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen flex flex-col" style={{ background: "#0d1117" }}>
|
<div
|
||||||
|
className="min-h-screen flex min-w-0 flex-col max-lg:overflow-x-hidden"
|
||||||
|
style={{ background: "#0d1117" }}
|
||||||
|
>
|
||||||
{/* Global Status Bar */}
|
{/* Global Status Bar */}
|
||||||
<StatusBar />
|
<StatusBar />
|
||||||
|
|
||||||
<div className="flex flex-1">
|
<div className="flex min-w-0 flex-1">
|
||||||
{/* Desktop sidebar — hidden on mobile */}
|
{/* Desktop sidebar — hidden on mobile */}
|
||||||
<div className="hidden lg:block">
|
<div className="hidden lg:block">
|
||||||
<Sidebar />
|
<Sidebar />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Main content area */}
|
{/* Main content area */}
|
||||||
<div className="flex-1 flex flex-col min-h-screen lg:ml-[220px]">
|
<div className="flex min-h-screen min-w-0 flex-1 flex-col max-lg:overflow-x-hidden lg:ml-[220px]">
|
||||||
<TopBar title={title} subtitle={subtitle} />
|
<TopBar title={title} subtitle={subtitle} />
|
||||||
<main
|
<main
|
||||||
className="flex-1 p-4 md:p-6 overflow-y-auto"
|
className="min-w-0 flex-1 overflow-y-auto p-4 md:p-6 max-lg:overflow-x-hidden"
|
||||||
/* On mobile, add bottom padding so content isn't hidden behind BottomNav */
|
/* On mobile, add bottom padding so content isn't hidden behind BottomNav */
|
||||||
style={{ paddingBottom: "calc(5rem + env(safe-area-inset-bottom, 0px))" }}
|
style={{ paddingBottom: "calc(5rem + env(safe-area-inset-bottom, 0px))" }}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -132,6 +132,23 @@
|
|||||||
input[type="radio"]:not(:disabled) {
|
input[type="radio"]:not(:disabled) {
|
||||||
@apply cursor-pointer;
|
@apply cursor-pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Phones & tablets: no whole-app horizontal pan / rubber-band */
|
||||||
|
@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
|
||||||
|
html {
|
||||||
|
overflow-x: hidden;
|
||||||
|
overscroll-behavior-x: none;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
overflow-x: hidden;
|
||||||
|
overscroll-behavior-x: none;
|
||||||
|
}
|
||||||
|
#root {
|
||||||
|
overflow-x: hidden;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@layer components {
|
@layer components {
|
||||||
|
|||||||
@@ -109,6 +109,8 @@ function FreqChart({
|
|||||||
const svgRef = useRef<SVGSVGElement | null>(null);
|
const svgRef = useRef<SVGSVGElement | null>(null);
|
||||||
const draggingBandRef = useRef<number | null>(null);
|
const draggingBandRef = useRef<number | null>(null);
|
||||||
const curvePathRef = useRef<SVGPathElement | null>(null);
|
const curvePathRef = useRef<SVGPathElement | null>(null);
|
||||||
|
const rawPathRef = useRef<SVGPathElement | null>(null);
|
||||||
|
const equalizedPathRef = useRef<SVGPathElement | null>(null);
|
||||||
const [chartWidth, setChartWidth] = useState(340);
|
const [chartWidth, setChartWidth] = useState(340);
|
||||||
const W = chartWidth;
|
const W = chartWidth;
|
||||||
const [isBandDragging, setIsBandDragging] = useState(false);
|
const [isBandDragging, setIsBandDragging] = useState(false);
|
||||||
@@ -221,6 +223,14 @@ function FreqChart({
|
|||||||
enabled: !isBandDragging,
|
enabled: !isBandDragging,
|
||||||
durationMs: 1350,
|
durationMs: 1350,
|
||||||
});
|
});
|
||||||
|
useStrokeDrawAnimation(rawPathRef, rawPathD, {
|
||||||
|
enabled: !isBandDragging && !!rawPathD,
|
||||||
|
durationMs: 1350,
|
||||||
|
});
|
||||||
|
useStrokeDrawAnimation(equalizedPathRef, equalizedPathD, {
|
||||||
|
enabled: !isBandDragging && !!equalizedPathD,
|
||||||
|
durationMs: 1350,
|
||||||
|
});
|
||||||
|
|
||||||
const freqLabels = [20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000];
|
const freqLabels = [20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000];
|
||||||
const gainLabels = [20, 15, 10, 5, 0, -5, -10, -15, -20];
|
const gainLabels = [20, 15, 10, 5, 0, -5, -10, -15, -20];
|
||||||
@@ -337,6 +347,7 @@ function FreqChart({
|
|||||||
{/* Raw */}
|
{/* Raw */}
|
||||||
{rawPathD && showRaw && (
|
{rawPathD && showRaw && (
|
||||||
<path
|
<path
|
||||||
|
ref={rawPathRef}
|
||||||
d={rawPathD}
|
d={rawPathD}
|
||||||
fill="none"
|
fill="none"
|
||||||
stroke="#ffffff"
|
stroke="#ffffff"
|
||||||
@@ -349,6 +360,7 @@ function FreqChart({
|
|||||||
{/* Equalized = EQ + Raw */}
|
{/* Equalized = EQ + Raw */}
|
||||||
{equalizedPathD && showEqualized && (
|
{equalizedPathD && showEqualized && (
|
||||||
<path
|
<path
|
||||||
|
ref={equalizedPathRef}
|
||||||
d={equalizedPathD}
|
d={equalizedPathD}
|
||||||
fill="none"
|
fill="none"
|
||||||
stroke="#23d2fe"
|
stroke="#23d2fe"
|
||||||
|
|||||||
Reference in New Issue
Block a user