enable disable is writing message

This commit is contained in:
DJ2LS 2023-02-14 16:00:10 +01:00
parent 023f0595df
commit fe991474c2
4 changed files with 37 additions and 3 deletions

View file

@ -88,7 +88,8 @@ const configDefaultSettings =
"wftheme": 2, \
"high_graphics" : "True",\
"explorer_stats" : "False", \
"auto_tune" : "False" \
"auto_tune" : "False", \
"enable_is_writing" : "True" \
}';
if (!fs.existsSync(configPath)) {

View file

@ -272,7 +272,10 @@ window.addEventListener("DOMContentLoaded", () => {
console.log(textarea.value);
if (lastIsWritingBroadcast < new Date().getTime() - 5 * 1000) {
//console.log("Sending FECIsWriting");
ipcRenderer.send("tnc-fec-iswriting");
console.log(config.enable_is_writing)
if(config.enable_is_writing == "True"){
ipcRenderer.send("tnc-fec-iswriting");
}
lastIsWritingBroadcast = new Date().getTime();
}
});

View file

@ -242,6 +242,12 @@ window.addEventListener("DOMContentLoaded", () => {
document.getElementById("scatterSwitch").checked = false;
}
if (config.enable_is_writing == "True") {
document.getElementById("enable_is_writing").checked = true;
} else {
document.getElementById("enable_is_writing").checked = false;
}
if (config.enable_fft == "True") {
document.getElementById("fftSwitch").checked = true;
} else {
@ -1000,6 +1006,16 @@ window.addEventListener("DOMContentLoaded", () => {
fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
});
// enable is writing switch clicked
document.getElementById("enable_is_writing").addEventListener("click", () => {
if (document.getElementById("enable_is_writing").checked == true) {
config.enable_is_writing = "True";
} else {
config.enable_is_writing = "False";
}
fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
});
// Tuning range clicked
document.getElementById("tuning_range_fmin").addEventListener("click", () => {
var tuning_range_fmin = document.getElementById("tuning_range_fmin").value;

View file

@ -1816,7 +1816,21 @@
aria-labelledby="chat-tab"
tabindex="0"
>
....
<div class="input-group input-group-sm mb-1">
<label class="input-group-text w-50">Enable "is typing"</label>
<label class="input-group-text bg-white w-50">
<div class="form-check form-switch form-check-inline">
<input
class="form-check-input"
type="checkbox"
id="enable_is_writing"
/>
<label class="form-check-label" for="GraphicsSwitch"
>Additional broadcast burst</label
>
</div>
</label>
</div>
</div>
<!--Rigctl tab contents-->
<div