diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 32264ad..ad19450 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -43,7 +43,7 @@ import { GetAwardDefs, GetUIPref, GetActiveProfile, QuitApp, ReportLiveActivity, LiveLastQSOAgeSec, - GetPGXLSettings, GetPGXLStatus, GetSPEStatus, GetACOMStatus, + GetPGXLSettings, GetPGXLStatus, GetSPEStatus, GetACOMStatus, SPESetOperate, ACOMSetOperate, } from '../wailsjs/go/main/App'; import { Combobox } from '@/components/ui/combobox'; import { applyAwardRefs } from '@/lib/awardRefs'; @@ -5145,7 +5145,9 @@ export default function App() { onClick={() => { setSettingsSection('rotator'); setShowSettings(true); }} /> {/* Amplifier chip: green = OPERATE, orange = STANDBY, red = offline. - (PGXL has no standby notion here — green when connected.) */} + CLICK toggles OPERATE ↔ STANDBY (SPE/ACOM; optimistic flip, the 2s + poll reconciles). The PGXL has no standby command here — its chip + opens Settings instead, and shows green when connected. */} {ampCfg.enabled && (() => { const isPGXL = ampCfg.type === 'pgxl'; const name = isPGXL ? 'PGXL' @@ -5153,12 +5155,20 @@ export default function App() { : `SPE ${ampSt.model || ''}`.trim(); const dot = !ampSt.connected ? 'bg-danger' : (isPGXL || ampSt.operate) ? 'bg-success' : 'bg-warning'; const state = !ampSt.connected ? (ampSt.last_error || 'offline') : (isPGXL ? (ampSt.state || 'connected') : ampSt.operate ? 'OPERATE' : 'STANDBY'); + const toggle = () => { + if (isPGXL) { setSettingsSection('pgxl'); setShowSettings(true); return; } + const want = !ampSt.operate; + setAmpSt((s: any) => ({ ...s, operate: want })); + (ampCfg.type.startsWith('acom') ? ACOMSetOperate(want) : SPESetOperate(want)).catch(() => {}); + }; return (