feat: collapsible Flex/amp/tuner cards, matched meter sizes, faster + distinct-icon TGXL

Addresses three points of feedback on the Tuner Genius work:

- Meter sizes: the amplifier meters were rendered `compact` (smaller than the
  FlexRadio meters). Dropped compact so the amp, tuner and Flex meters are all
  the same size.
- Collapsible cards: the FlexRadio panel Card, AmpCard and TunerCard now fold
  from a chevron in the header, state persisted per card (opslog.cardOpen.*).
  The amplifier cards share the "amplifier" collapse key across their SPE/ACOM/
  PGXL variants so folding sticks regardless of the shown model.
- TGXL responsiveness: the tuner's device poll dropped 1500ms→400ms and the
  three UI pollers 1500ms→500ms, so the SWR/power meters track TX without the
  2–3s lag behind the amplifier the user saw.
- Icon: the Tuner Genius top-bar toggle used Zap, same as the CW keyer — changed
  the tuner's icon (top bar + widget + card) to Gauge so the two are distinct.
This commit is contained in:
2026-07-25 11:22:56 +02:00
parent 9b677c6b35
commit 3a9dda13c4
8 changed files with 63 additions and 36 deletions
+5 -3
View File
@@ -1,6 +1,6 @@
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import {
Activity, AlertCircle, Antenna, Bell, CheckCircle2, Clock, CloudOff, Compass, Database, Ear, Eraser, Hash, Loader2, Lock,
Activity, AlertCircle, Antenna, Bell, CheckCircle2, Clock, CloudOff, Compass, Database, Ear, Eraser, Gauge, Hash, Loader2, Lock,
Maximize2, Minimize2, Mic, MessageSquare, Pencil, Radio, RadioTower, RefreshCw, Satellite, Send, Settings, SlidersHorizontal, Square, Terminal, Trash2, Unlock, X, Zap,
} from 'lucide-react';
@@ -1687,7 +1687,9 @@ export default function App() {
} catch {}
};
tick();
const id = window.setInterval(tick, 1500);
// Fast poll so the SWR/power meters track TX responsively (backend polls the
// device at ~400ms; 500ms here keeps the UI close behind).
const id = window.setInterval(tick, 500);
return () => { alive = false; window.clearInterval(id); };
}, []);
const tgTune = () => {
@@ -4143,7 +4145,7 @@ export default function App() {
: 'border-border text-muted-foreground hover:bg-muted',
)}
>
<Zap className="size-4" />
<Gauge className="size-4" />
{showTuner && tgStatus.connected && <span className="absolute -top-0.5 -right-0.5 size-2 rounded-full bg-success" />}
</button>
)}