Merge pull request #308 from DJ2LS/ls-gui

small gui fixes
This commit is contained in:
DJ2LS 2022-12-24 16:14:41 +01:00 committed by GitHub
commit d26186e6fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

View file

@ -798,22 +798,21 @@ document.getElementById('hamlib_rigctld_stop').addEventListener('click', () => {
ipcRenderer.send('run-tnc-command', Data);
});
// saveMyCall button clicked
document.getElementById("saveMyCall").addEventListener("click", () => {
document.getElementById("myCall").addEventListener("input", () => {
callsign = document.getElementById("myCall").value;
ssid = document.getElementById("myCallSSID").value;
callsign_ssid = callsign.toUpperCase() + '-' + ssid;
config.mycall = callsign_ssid;
// split document title by looking for Call then split and update it
var documentTitle = document.title.split('Call:')
document.title = documentTitle[0] + 'Call: ' + callsign_ssid;
fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
daemon.saveMyCall(callsign_ssid);
});
// saveMyGrid button clicked
document.getElementById("saveMyGrid").addEventListener("click", () => {
document.getElementById("myGrid").addEventListener("input", () => {
grid = document.getElementById("myGrid").value;
config.mygrid = grid;
fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
@ -1314,6 +1313,12 @@ ipcRenderer.on('action-update-tnc-state', (event, arg) => {
}
if (typeof(arg.mycallsign) !== 'undefined') {
// split document title by looking for Call then split and update it
var documentTitle = document.title.split('Call:')
document.title = documentTitle[0] + 'Call: ' + arg.mycallsign;
}
// TOE TIME OF EXECUTION --> How many time needs a command to be executed until data arrives
// deactivated this feature, beacuse its useless at this time. maybe it is getting more interesting, if we are working via network

View file

@ -731,7 +731,6 @@
<option value="14">14</option>
<option value="15">15</option>
</select>
<button class="btn btn-sm btn-success" id="saveMyCall" type="button"> <i class="bi bi-check2" style="font-size: 1rem; color: white;"></i> </button>
</div>
</div>
<div class="col-md-auto">
@ -739,7 +738,6 @@
<i class="bi bi-house-fill" style="font-size: 1rem; color: black;"></i>
</span>
<input type="text" class="form-control mr-1" style="max-width: 6rem" placeholder="locator" id="myGrid" maxlength="6" aria-label="Input group" aria-describedby="btnGroupAddon">
<button class="btn btn-sm btn-success" id="saveMyGrid" type="button"> <i class="bi bi-check2" style="font-size: 1rem; color: white;"></i> </button>
</div>
</div>
</div>