Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4ea35baf8 |
@@ -419,8 +419,10 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
|||||||
<button id="tx-limit-btn" type="button">Set</button>
|
<button id="tx-limit-btn" type="button">Set</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="full-row label-below-row" id="audio-row">
|
<details id="audio-controls" class="advanced-radio-controls audio-controls-section">
|
||||||
<div class="label"><span>Audio</span></div>
|
<summary>Audio controls</summary>
|
||||||
|
<div class="advanced-radio-body">
|
||||||
|
<div class="full-row" id="audio-row">
|
||||||
<div class="inline" style="gap: 0.6rem; flex-wrap: wrap; align-items: center;">
|
<div class="inline" style="gap: 0.6rem; flex-wrap: wrap; align-items: center;">
|
||||||
<button id="rx-audio-btn" type="button">Play Audio</button>
|
<button id="rx-audio-btn" type="button">Play Audio</button>
|
||||||
<button id="tx-audio-btn" type="button">Transmit Audio</button>
|
<button id="tx-audio-btn" type="button">Transmit Audio</button>
|
||||||
@@ -434,6 +436,8 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</details>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -126,10 +126,10 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
const layouts = {
|
const layouts = {
|
||||||
compact: { label: "Compact", advanced: false, preferredTab: "main" },
|
compact: { label: "Compact", advanced: false, audio: false, scheduler: false, preferredTab: "main" },
|
||||||
broadcast: { label: "Broadcast", unavailable: "Broadcast requires an enumerated WFM-capable receiver", advanced: false, preferredTab: "main", capability: "broadcast" },
|
broadcast: { label: "Broadcast", unavailable: "Broadcast requires an enumerated WFM-capable receiver", advanced: false, audio: true, scheduler: false, preferredTab: "main", capability: "broadcast" },
|
||||||
digital: { label: "Digital", unavailable: "Digital requires a compatible rig mode and an available decoder", advanced: false, preferredTab: "digital-modes", capability: "digital" },
|
digital: { label: "Digital", unavailable: "Digital requires a compatible rig mode and an available decoder", advanced: false, audio: false, scheduler: false, preferredTab: "digital-modes", capability: "digital" },
|
||||||
full: { label: "Full controls", advanced: true, preferredTab: "main" },
|
full: { label: "Full controls", advanced: true, audio: true, scheduler: true, preferredTab: "main" },
|
||||||
};
|
};
|
||||||
const layoutCapabilities = { broadcast: false, digital: false };
|
const layoutCapabilities = { broadcast: false, digital: false };
|
||||||
let activeRigId = null;
|
let activeRigId = null;
|
||||||
@@ -195,6 +195,10 @@
|
|||||||
if (options.persist !== false) localStorage.setItem(layoutStorageKey(), document.body.dataset.operatorLayout);
|
if (options.persist !== false) localStorage.setItem(layoutStorageKey(), document.body.dataset.operatorLayout);
|
||||||
const details = document.getElementById("advanced-radio-controls");
|
const details = document.getElementById("advanced-radio-controls");
|
||||||
if (details) details.open = layout.advanced;
|
if (details) details.open = layout.advanced;
|
||||||
|
const audioDetails = document.getElementById("audio-controls");
|
||||||
|
if (audioDetails) audioDetails.open = layout.audio;
|
||||||
|
const schedulerDetails = document.getElementById("scheduler-controls");
|
||||||
|
if (schedulerDetails) schedulerDetails.open = layout.scheduler;
|
||||||
if (options.navigate && typeof window.navigateToTab === "function") {
|
if (options.navigate && typeof window.navigateToTab === "function") {
|
||||||
window.navigateToTab(layout.preferredTab);
|
window.navigateToTab(layout.preferredTab);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,5 +89,6 @@ mod tests {
|
|||||||
);
|
);
|
||||||
assert!(UI_CORE_JS.contains("window.trxUi"));
|
assert!(UI_CORE_JS.contains("window.trxUi"));
|
||||||
assert!(html.contains("<summary>Scheduler controls</summary>"));
|
assert!(html.contains("<summary>Scheduler controls</summary>"));
|
||||||
|
assert!(html.contains("<summary>Audio controls</summary>"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user