[feat](trx-frontend-http): virtual channel manager and picker UI
Add client-side virtual channel support (Phase 1 — metadata only):
- vchan.rs: ClientChannelManager keyed by rig_id; tracks per-session
channel subscriptions and broadcasts list changes via change_tx
- server.rs: instantiate Arc<ClientChannelManager> and expose as app_data
- api.rs: wire ClientChannelManager into /events SSE (session UUID,
init_rig, update_primary, channel change stream, session cleanup on
disconnect); add channel CRUD routes:
GET/POST /channels/{rig_id}
DELETE /channels/{rig_id}/{channel_id}
POST /channels/{rig_id}/{channel_id}/subscribe
PUT /channels/{rig_id}/{channel_id}/freq|mode
- auth.rs: classify /channels/ prefix as Read access
- plugins/vchan.js: channel picker with +/× buttons, subscribe on click,
SDR-only (shown when filter_controls capability is set)
- app.js: handle SSE `session` and `channels` events, call
vchanApplyCapabilities from applyCapabilities
- index.html: #vchan-row div + <script src="/vchan.js">
- style.css: .vchan-picker pill styles
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -259,6 +259,10 @@
|
||||
<div class="label"><span>VFO</span></div>
|
||||
<div class="vfo-picker" id="vfo-picker"></div>
|
||||
</div>
|
||||
<div class="full-row label-below-row" id="vchan-row" style="display:none;">
|
||||
<div class="label"><span>Channels</span></div>
|
||||
<div class="vchan-picker" id="vchan-picker"></div>
|
||||
</div>
|
||||
<div class="full-row label-below-row">
|
||||
<div class="label"><span>Signal</span></div>
|
||||
<div class="signal" style="gap: 1rem;">
|
||||
@@ -800,6 +804,7 @@
|
||||
<script src="/cw.js"></script>
|
||||
<script src="/bookmarks.js"></script>
|
||||
<script src="/scheduler.js"></script>
|
||||
<script src="/vchan.js"></script>
|
||||
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
|
||||
<script src="/leaflet-ais-tracksymbol.js"></script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user