[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:
@@ -365,6 +365,43 @@ input.status-input, select.status-input { width: 100%; padding: 0.45rem 0.5rem;
|
||||
background: var(--btn-bg);
|
||||
font-weight: 600;
|
||||
}
|
||||
.vchan-picker {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
}
|
||||
.vchan-picker button {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
border: 1px solid var(--border-light);
|
||||
border-radius: 6px;
|
||||
height: var(--control-height);
|
||||
padding: 0 0.55rem;
|
||||
background: var(--input-bg);
|
||||
color: var(--text-muted);
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
font-size: 0.82rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
.vchan-picker button.active {
|
||||
background: var(--btn-bg);
|
||||
color: var(--text);
|
||||
font-weight: 600;
|
||||
border-color: var(--btn-border, var(--border-light));
|
||||
}
|
||||
.vchan-del {
|
||||
opacity: 0.5;
|
||||
font-size: 1rem;
|
||||
line-height: 1;
|
||||
}
|
||||
.vchan-del:hover { opacity: 1; }
|
||||
.vchan-add {
|
||||
font-size: 1.1rem;
|
||||
font-weight: 700;
|
||||
padding: 0 0.6rem !important;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
.signal-measure {
|
||||
display: inline-flex;
|
||||
gap: 0.5rem;
|
||||
|
||||
Reference in New Issue
Block a user