feat(ui): render the Cockpit utility launchers and compact Radio controls from a store

The Display and Radio launchers, their popovers and the compact Radio
transport, Enable button and volume now render from the Radio store.
RadioControls owns the disclosure state; Cockpit Escape and the Display
reveal read that state instead of the DOM, and the Enable toggle guards
re-presses synchronously. The compact transport reuses the panel's
transport state and adds only its glyph and title.
This commit is contained in:
Sameh Khamis committed 2026-10-31 16:53:28 -07:00
1 parent 58504e370c
commit b6d565a83f
20 files changed
+495 -205

No files matched your search

+14 -5
View File
@@ -3,10 +3,11 @@ import { markRaw, shallowRef } from 'vue';
/**
* The Radio panel as its view renders it. RadioControls presents the
* directory row, station card, transport, volume and playback line
* (`renderRadioState()`) and publishes them here; it keeps its listeners,
* the tuner and the Cockpit radio controls. LocalSdrControls publishes the
* local RTL-SDR card beside it.
* directory row, station card, transport, volume and playback line and the
* Cockpit's compact radio controls (`renderRadioState()`), and which Cockpit
* utility popover is open, and publishes them here; it keeps its listeners
* and the tuner. LocalSdrControls publishes the local RTL-SDR card beside
* it.
*/
export const useRadioStore = defineStore('gev-radio', () => {
/** The presented panel; null until the controls first render. */
@@ -25,5 +26,13 @@ export const useRadioStore = defineStore('gev-radio', () => {
sdr.value = markRaw(next);
}
return { view, publish, sdr, publishSdr };
/** The open Cockpit utility popover; null until one first opens or closes. */
const utility = shallowRef(null);
/** @param {{display: boolean, radio: boolean}} next */
function publishUtility(next) {
utility.value = markRaw(next);
}
return { view, publish, sdr, publishSdr, utility, publishUtility };
});