mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
WIP Settings and Updater
updater not yet working, moved settings to settings modal and started working on new updater
This commit is contained in:
parent
88149830df
commit
b1cebf0905
4 changed files with 62 additions and 20 deletions
|
@ -538,8 +538,8 @@ autoUpdater.on('update-downloaded', (info) => {
|
||||||
// we need to call this at this point.
|
// we need to call this at this point.
|
||||||
// if an update is available and we are force closing the app
|
// if an update is available and we are force closing the app
|
||||||
// the entire screen crashes...
|
// the entire screen crashes...
|
||||||
mainLog.info('quit application and install update');
|
//mainLog.info('quit application and install update');
|
||||||
autoUpdater.quitAndInstall();
|
//autoUpdater.quitAndInstall();
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -156,6 +156,7 @@ document.getElementById('openReceivedFilesFolder').addEventListener('click', ()
|
||||||
|
|
||||||
// Update channel selector
|
// Update channel selector
|
||||||
document.getElementById("update_channel_selector").value = config.update_channel;
|
document.getElementById("update_channel_selector").value = config.update_channel;
|
||||||
|
document.getElementById("updater_channel").innerHTML = config.update_channel;
|
||||||
|
|
||||||
// Update tuning range fmin fmax
|
// Update tuning range fmin fmax
|
||||||
document.getElementById("tuning_range_fmin").value = config.tuning_range_fmin;
|
document.getElementById("tuning_range_fmin").value = config.tuning_range_fmin;
|
||||||
|
@ -1855,12 +1856,23 @@ ipcRenderer.on('action-updater', (event, arg) => {
|
||||||
); // Returns a Bootstrap toast instance
|
); // Returns a Bootstrap toast instance
|
||||||
toast.show();
|
toast.show();
|
||||||
document.title = "FreeDATA by DJ2LS" + ' - v' + arg.version;
|
document.title = "FreeDATA by DJ2LS" + ' - v' + arg.version;
|
||||||
|
document.getElementById("updater_status").innerHTML = "checking for update..."
|
||||||
|
document.getElementById("updater_status").setAttribute("class") = "btn btn-secondary btn-sm"
|
||||||
|
document.getElementById("update_and_install").style.display = 'none';
|
||||||
}
|
}
|
||||||
if (arg.status == "update-downloaded"){
|
if (arg.status == "update-downloaded"){
|
||||||
var toast = bootstrap.Toast.getOrCreateInstance(
|
var toast = bootstrap.Toast.getOrCreateInstance(
|
||||||
document.getElementById('toastUpdateDownloaded')
|
document.getElementById('toastUpdateDownloaded')
|
||||||
); // Returns a Bootstrap toast instance
|
); // Returns a Bootstrap toast instance
|
||||||
toast.show();
|
toast.show();
|
||||||
|
document.getElementById("updater_status").innerHTML = "update downloaded..."
|
||||||
|
document.getElementById("updater_status").setAttribute("class") = "btn btn-secondary btn-sm"
|
||||||
|
document.getElementById("update_and_install").style.display = 'block';
|
||||||
|
|
||||||
|
// HERE WE NEED TO RUN THIS SOMEHOW...
|
||||||
|
//mainLog.info('quit application and install update');
|
||||||
|
//autoUpdater.quitAndInstall();
|
||||||
|
|
||||||
}
|
}
|
||||||
if (arg.status == "update-not-available"){
|
if (arg.status == "update-not-available"){
|
||||||
bootstrap.Toast.getOrCreateInstance(document.getElementById('toastUpdateChecking')).hide();
|
bootstrap.Toast.getOrCreateInstance(document.getElementById('toastUpdateChecking')).hide();
|
||||||
|
@ -1868,6 +1880,9 @@ ipcRenderer.on('action-updater', (event, arg) => {
|
||||||
document.getElementById('toastUpdateNotAvailable')
|
document.getElementById('toastUpdateNotAvailable')
|
||||||
); // Returns a Bootstrap toast instance
|
); // Returns a Bootstrap toast instance
|
||||||
toast.show();
|
toast.show();
|
||||||
|
document.getElementById("updater_status").innerHTML = "update not available"
|
||||||
|
document.getElementById("updater_status").setAttribute("class") = "btn btn-secondary btn-sm"
|
||||||
|
document.getElementById("update_and_install").style.display = 'none';
|
||||||
}
|
}
|
||||||
if (arg.status == "update-available"){
|
if (arg.status == "update-available"){
|
||||||
|
|
||||||
|
@ -1876,15 +1891,21 @@ ipcRenderer.on('action-updater', (event, arg) => {
|
||||||
document.getElementById('toastUpdateAvailable')
|
document.getElementById('toastUpdateAvailable')
|
||||||
); // Returns a Bootstrap toast instance
|
); // Returns a Bootstrap toast instance
|
||||||
toast.show();
|
toast.show();
|
||||||
|
document.getElementById("updater_status").innerHTML = "update available..."
|
||||||
|
document.getElementById("updater_status").setAttribute("class") = "btn btn-secondary btn-sm"
|
||||||
|
document.getElementById("update_and_install").style.display = 'block';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (arg.status == "error"){
|
if (arg.status == "error"){
|
||||||
var toast = bootstrap.Toast.getOrCreateInstance(
|
var toast = bootstrap.Toast.getOrCreateInstance(
|
||||||
document.getElementById('toastUpdateNotChecking')
|
document.getElementById('toastUpdateNotChecking')
|
||||||
); // Returns a Bootstrap toast instance
|
); // Returns a Bootstrap toast instance
|
||||||
toast.show();
|
toast.show();
|
||||||
|
document.getElementById("updater_status").innerHTML = "update error..."
|
||||||
|
document.getElementById("updater_status").setAttribute("class") = "btn btn-danger btn-sm"
|
||||||
|
document.getElementById("update_and_install").style.display = 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -757,22 +757,13 @@
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="card text-dark mb-0">
|
<div class="card text-dark mb-0">
|
||||||
<div class="card-header p-1">
|
<div class="card-header p-1">
|
||||||
<i class="bi bi-sliders2" style="font-size: 1rem; color: black;"></i> <strong>TNC SETTINGS</strong>
|
<i class="bi bi-sliders2" style="font-size: 1rem; color: black;"></i> <strong>Auto-Updater</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body p-2 mb-1">
|
<div class="card-body p-2 mb-1">
|
||||||
<div class="form-check form-switch form-check-inline">
|
<button class="btn btn-secondary btn-sm" id="updater_channel" type="button" disabled>...</button>
|
||||||
<input class="form-check-input" type="checkbox" id="fftSwitch">
|
<button class="btn btn-secondary btn-sm" id="updater_status" type="button" disabled>...</button>
|
||||||
<label class="form-check-label" for="fftSwitch">Waterfall</label>
|
<button class="btn btn-secondary btn-sm" id="updater_changelog" type="button" style="display:none;">Changelog</button>
|
||||||
</div>
|
<button class="btn btn-primary btn-sm" id="update_and_install" type="button" style="display:none;">Install & Restart</button>
|
||||||
<div class="form-check form-switch form-check-inline">
|
|
||||||
<input class="form-check-input" type="checkbox" id="scatterSwitch">
|
|
||||||
<label class="form-check-label" for="scatterSwitch">Scatter</label>
|
|
||||||
</div>
|
|
||||||
<div class="form-check form-switch form-check-inline">
|
|
||||||
<input class="form-check-input" type="checkbox" id="500HzModeSwitch">
|
|
||||||
<label class="form-check-label" for="500HzModeSwitch">500Hz (HF)</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!--<button class="btn btn-secondary btn-sm" id="python_version" type="button" disabled>Python</button>-->
|
<!--<button class="btn btn-secondary btn-sm" id="python_version" type="button" disabled>Python</button>-->
|
||||||
<!--<button class="btn btn-secondary btn-sm" id="node_version" type="button" disabled>Node</button>-->
|
<!--<button class="btn btn-secondary btn-sm" id="node_version" type="button" disabled>Node</button>-->
|
||||||
|
@ -1321,6 +1312,36 @@
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="input-group input-group-sm mb-1">
|
||||||
|
<label class="input-group-text">Enable Waterfall data</label>
|
||||||
|
<label class="input-group-text">
|
||||||
|
<div class="form-check form-switch form-check-inline">
|
||||||
|
<input class="form-check-input" type="checkbox" id="fftSwitch">
|
||||||
|
<label class="form-check-label" for="fftSwitch">Waterfall</label>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="input-group input-group-sm mb-1">
|
||||||
|
<label class="input-group-text">Enable Scatter diagram data</label>
|
||||||
|
<label class="input-group-text">
|
||||||
|
<div class="form-check form-switch form-check-inline">
|
||||||
|
<input class="form-check-input" type="checkbox" id="scatterSwitch">
|
||||||
|
<label class="form-check-label" for="scatterSwitch">Scatter</label>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="input-group input-group-sm mb-1">
|
||||||
|
<label class="input-group-text">Enable 500Hz mode</label>
|
||||||
|
<label class="input-group-text">
|
||||||
|
<div class="form-check form-switch form-check-inline">
|
||||||
|
<input class="form-check-input" type="checkbox" id="500HzModeSwitch">
|
||||||
|
<label class="form-check-label" for="500HzModeSwitch">500Hz</label>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -383,7 +383,7 @@ Spectrum.prototype.onKeypress = function(e) {
|
||||||
|
|
||||||
function Spectrum(id, options) {
|
function Spectrum(id, options) {
|
||||||
// Handle options
|
// Handle options
|
||||||
this.centerHz = (options && options.centerHz) ? options.centerHz : 0;
|
this.centerHz = (options && options.centerHz) ? options.centerHz : 1500;
|
||||||
this.spanHz = (options && options.spanHz) ? options.spanHz : 0;
|
this.spanHz = (options && options.spanHz) ? options.spanHz : 0;
|
||||||
this.wf_size = (options && options.wf_size) ? options.wf_size : 0;
|
this.wf_size = (options && options.wf_size) ? options.wf_size : 0;
|
||||||
this.wf_rows = (options && options.wf_rows) ? options.wf_rows : 1024;
|
this.wf_rows = (options && options.wf_rows) ? options.wf_rows : 1024;
|
||||||
|
|
Loading…
Reference in a new issue