mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
feat(ui): render the local RTL-SDR card from the store
LocalSdrControls publishes the card to the radio store and SdrCard renders it. The new v-field-value directive never overwrites a focused field, including one a render disables.
This commit is contained in:
1 parent
ccb7edd0d1
commit
b6c7c130f6
11 files changed
+402
-158
No files matched your search
+11
-2
@@ -5,7 +5,8 @@ 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.
|
||||
* the tuner and the Cockpit radio controls. LocalSdrControls publishes the
|
||||
* local RTL-SDR card beside it.
|
||||
*/
|
||||
export const useRadioStore = defineStore('gev-radio', () => {
|
||||
/** The presented panel; null until the controls first render. */
|
||||
@@ -16,5 +17,13 @@ export const useRadioStore = defineStore('gev-radio', () => {
|
||||
view.value = markRaw(next);
|
||||
}
|
||||
|
||||
return { view, publish };
|
||||
/** The local RTL-SDR card; null until its controls first render. */
|
||||
const sdr = shallowRef(null);
|
||||
|
||||
/** @param {object} next A fresh presentation of the RTL-SDR card. */
|
||||
function publishSdr(next) {
|
||||
sdr.value = markRaw(next);
|
||||
}
|
||||
|
||||
return { view, publish, sdr, publishSdr };
|
||||
});
|
||||
Reference in new issue
Block a user