Include version number in title

This commit is contained in:
Mashintime 2023-01-22 14:36:05 -05:00
parent 1de9e4fde8
commit c8dd72de3e
2 changed files with 9 additions and 2 deletions

View file

@ -375,6 +375,7 @@ app.whenReady().then(() => {
daemonPath=null;
mainLog.info("Daemon binary doesn't exist--normal for dev environments.")
}
win.send("action-set-app-version",app.getVersion());
});
app.on('activate', () => {

View file

@ -28,7 +28,8 @@ const config = require(configPath);
// we are going to check if we have unequal values before we start calculating again
var dbfs_level_raw = 0
//Global version variable
var appVer = null;
// START INTERVALL COMMAND EXECUTION FOR STATES
//setInterval(sock.getRxBuffer, 1000);
@ -2747,9 +2748,14 @@ function checkRigctld(){
ipcRenderer.on('action-check-rigctld', (event, data) => {
document.getElementById("hamlib_rigctld_status").value = data["state"];
});
ipcRenderer.on('action-set-app-version', (event, data) => {
appVer = data;
});
function updateTitle(mycall = config.mycall , tnc = config.tnc_host, tncport = config.tnc_port, appender = ""){
//Multiple consecutive spaces get converted to a single space
var title ="FreeDATA - Call: " + mycall + " - TNC: " + tnc +":" + tncport + appender;
var title ="FreeDATA " + appVer + " - Call: " + mycall + " - TNC: " + tnc + ":" + tncport + appender;
if (title != document.title)
document.title=title;
}