added rigctld help field

This commit is contained in:
DJ2LS 2023-02-12 15:08:13 +01:00
parent 19a58a8a6c
commit 7e589c3bef
2 changed files with 68 additions and 57 deletions

View file

@ -383,34 +383,34 @@ window.addEventListener("DOMContentLoaded", () => {
// radio control element
if (config.radiocontrol == "rigctld") {
document.getElementById("radio-control-switch-disabled").checked = false;
document.getElementById("radio-control-switch-network").checked = false;
document.getElementById("radio-control-switch-rigctld").checked = true;
document.getElementById("radio-control-switch-help").checked = false;
document.getElementById("radio-control-disabled").style.visibility =
"hidden";
document.getElementById("radio-control-disabled").style.display = "none";
document.getElementById("radio-control-network").style.visibility =
document.getElementById("radio-control-help").style.visibility =
"hidden";
document.getElementById("radio-control-network").style.display = "none";
document.getElementById("radio-control-help").style.display = "none";
document.getElementById("radio-control-rigctld-info").style.visibility =
"hidden";
document.getElementById("radio-control-rigctld-info").style.display =
"none";
document.getElementById("radio-control-rigctld").style.visibility =
"visible";
document.getElementById("radio-control-rigctld").style.display =
"block";
} else {
document.getElementById("radio-control-switch-disabled").checked = true;
document.getElementById("radio-control-switch-network").checked = false;
document.getElementById(
"radio-control-switch-rigctld-info"
).checked = false;
document.getElementById("radio-control-switch-help").checked = false;
document.getElementById("radio-control-switch-rigctld").checked = false;
document.getElementById("radio-control-network").style.display = "none";
document.getElementById("radio-control-network").style.visibility =
document.getElementById("radio-control-help").style.display = "none";
document.getElementById("radio-control-help").style.visibility =
"hidden";
document.getElementById("radio-control-rigctld-info").style.visibility =
document.getElementById("radio-control-rigctld").style.visibility =
"hidden";
document.getElementById("radio-control-rigctld-info").style.display =
document.getElementById("radio-control-rigctld").style.display =
"none";
}
@ -484,13 +484,13 @@ window.addEventListener("DOMContentLoaded", () => {
document.getElementById("radio-control-disabled").style.visibility =
"visible";
document.getElementById("radio-control-network").style.display = "none";
document.getElementById("radio-control-network").style.visibility =
document.getElementById("radio-control-help").style.display = "none";
document.getElementById("radio-control-help").style.visibility =
"hidden";
document.getElementById("radio-control-rigctld-info").style.visibility =
document.getElementById("radio-control-rigctld").style.visibility =
"hidden";
document.getElementById("radio-control-rigctld-info").style.display =
document.getElementById("radio-control-rigctld").style.display =
"none";
config.radiocontrol = "disabled";
@ -499,7 +499,7 @@ window.addEventListener("DOMContentLoaded", () => {
// // radio settings 'network' event listener
document
.getElementById("radio-control-switch-network")
.getElementById("radio-control-switch-help")
.addEventListener("click", () => {
document.getElementById("hamlib_info_field").innerHTML =
"Set the ip and port of a rigctld session";
@ -508,13 +508,13 @@ window.addEventListener("DOMContentLoaded", () => {
document.getElementById("radio-control-disabled").style.visibility =
"hidden";
document.getElementById("radio-control-network").style.display = "block";
document.getElementById("radio-control-network").style.visibility =
document.getElementById("radio-control-help").style.display = "block";
document.getElementById("radio-control-help").style.visibility =
"visible";
document.getElementById("radio-control-rigctld-info").style.visibility =
document.getElementById("radio-control-rigctld").style.visibility =
"hidden";
document.getElementById("radio-control-rigctld-info").style.display =
document.getElementById("radio-control-rigctld").style.display =
"none";
config.radiocontrol = "rigctld";
@ -523,7 +523,7 @@ window.addEventListener("DOMContentLoaded", () => {
// // radio settings 'rigctld' event listener
document
.getElementById("radio-control-switch-rigctld-info")
.getElementById("radio-control-switch-rigctld")
.addEventListener("click", () => {
document.getElementById("hamlib_info_field").innerHTML =
"Start and stop rigctld .";
@ -532,13 +532,13 @@ window.addEventListener("DOMContentLoaded", () => {
document.getElementById("radio-control-disabled").style.visibility =
"hidden";
document.getElementById("radio-control-network").style.display = "none";
document.getElementById("radio-control-network").style.visibility =
document.getElementById("radio-control-help").style.display = "none";
document.getElementById("radio-control-help").style.visibility =
"hidden";
document.getElementById("radio-control-rigctld-info").style.visibility =
document.getElementById("radio-control-rigctld").style.visibility =
"visible";
document.getElementById("radio-control-rigctld-info").style.display =
document.getElementById("radio-control-rigctld").style.display =
"block";
config.radiocontrol = "rigctld";

View file

@ -347,35 +347,16 @@
type="radio"
class="btn-check"
name="radio-control-switch"
id="radio-control-switch-rigctld-info"
id="radio-control-switch-rigctld"
autocomplete="off"
/>
<label
class="btn btn-sm btn-outline-secondary"
for="radio-control-switch-rigctld-info"
for="radio-control-switch-rigctld"
>
Run locally
</label>
</div>
<div
class="btn-group btn-group-sm"
role="group"
aria-label="radio-control-switch-rigctld"
>
<input
type="radio"
class="btn-check"
name="radio-control-switch"
id="radio-control-switch-network"
autocomplete="off"
/>
<label
class="btn btn-sm btn-outline-secondary"
for="radio-control-switch-network"
>
Network
</label>
</div>
<div class="btn-group" role="group">
<button
type="button"
@ -389,15 +370,38 @@
PTT Test
</button>
</div>
<div
class="btn-group btn-group-sm"
role="group"
aria-label="radio-control-switch-rigctld"
>
<input
type="radio"
class="btn-check"
name="radio-control-switch"
id="radio-control-switch-help"
autocomplete="off"
/>
<label
class="btn btn-sm btn-outline-secondary"
for="radio-control-switch-help"
>
Help
</label>
</div>
</div>
<div class="card-body p-2">
<!-- RADIO CONTROL DISABLED -->
<div id="radio-control-disabled">
hamlib/rigctld connection disabled
</div>
<!-- RADIO CONTROL NETWORK -->
<div id="radio-control-network">
<!-- RADIO CONTROL RIGCTLD INFO-->
<div id="radio-control-rigctld">
<div class="input-group input-group-sm mb-1">
<div class="input-group input-group-sm mb-1">
<span class="input-group-text">Rigctld IP</span>
<input
type="text"
@ -417,10 +421,8 @@
aria-describedby="basic-addon1"
/>
</div>
</div>
<!-- RADIO CONTROL RIGCTLD INFO-->
<div id="radio-control-rigctld-info">
<div class="input-group input-group-sm mb-1">
<button
class="btn btn-outline-success"
type="button"
@ -444,7 +446,17 @@
Stop
</button>
</div>
</div>
<!-- RADIO CONTROL HELP -->
<div id="radio-control-help">
...
</div>
</div>
<div class="card-footer text-muted small" id="hamlib_info_field">
Select your radio and PTT settings. Start/Stop Hamlib Rigctld
@ -2032,7 +2044,6 @@
Device Port
</span>
</span>
<select
class="form-select form-select-sm"
aria-label=".form-select-sm"