Improve wifi fallback

This commit is contained in:
Robert Strouse 2024-03-03 08:33:19 -08:00
parent ea5614c700
commit 60af2bf399
14 changed files with 133 additions and 69 deletions

View file

@ -1 +1 @@
2.4.0
2.4.1

View file

@ -3,11 +3,11 @@
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8">
<link rel="stylesheet" href="main.css?v=2.4.0c" type="text/css" />
<link rel="stylesheet" href="widgets.css?v=2.4.0c" type="text/css" />
<link rel="stylesheet" href="icons.css?v=2.4.0c" type="text/css" />
<link rel="stylesheet" href="main.css?v=2.4.1a" type="text/css" />
<link rel="stylesheet" href="widgets.css?v=2.4.1a" type="text/css" />
<link rel="stylesheet" href="icons.css?v=2.4.1a" type="text/css" />
<link rel="icon" type="image/png" href="favicon.png" />
<script type="text/javascript" src="index.js?v=2.4.0c"></script>
<script type="text/javascript" src="index.js?v=2.4.1a"></script>
</head>
<body>
<div id="divContainer" class="container main" data-auth="false">

View file

@ -1264,7 +1264,7 @@ var security = new Security();
class General {
initialized = false;
appVersion = 'v2.4.0';
appVersion = 'v2.4.1';
reloadApp = false;
init() {
if (this.initialized) return;
@ -4254,12 +4254,13 @@ class Firmware {
let div = this.createFileUploader('/restore');
let inst = div.querySelector('div[id=divInstText]');
let html = '<div style="font-size:14px;">Select a backup file that you would like to restore and the options you would like to restore then press the Upload File button.</div><hr />';
html += `<div style="font-size:14px;">Restoring network settings from a different board than the original will ignore Ethernet chip settings. Security, MQTT and WiFi will also not be restored since backup files do not contain passwords.</div><hr/>`;
html += `<div style="font-size:14px;">Restoring network settings from a different board than the original will ignore Ethernet chip settings. Security, MQTT and WiFi connection information will also not be restored since backup files do not contain passwords.</div><hr/>`;
html += '<div style="font-size:14px;margin-bottom:27px;text-align:left;margin-left:70px;">';
html += `<div class="field-group" style="vertical-align:middle;width:auto;"><input id="cbRestoreShades" type="checkbox" data-bind="shades" style="display:inline-block;" checked="true" /><label for="cbRestoreShades" style="display:inline-block;cursor:pointer;color:white;">Restore Shades and Groups</label></div>`;
html += `<div class="field-group" style="vertical-align:middle;width:auto;"><input id="cbRestoreRepeaters" type="checkbox" data-bind="repeaters" style="display:inline-block;" /><label for="cbRestoreRepeaters" style="display:inline-block;cursor:pointer;color:white;">Restore Repeaters</label></div>`;
html += `<div class="field-group" style="vertical-align:middle;width:auto;"><input id="cbRestoreSystem" type="checkbox" data-bind="settings" style="display:inline-block;" /><label for="cbRestoreSystem" style="display:inline-block;cursor:pointer;color:white;">Restore System Settings</label></div>`;
html += `<div class="field-group" style="vertical-align:middle;width:auto;"><input id="cbRestoreNetwork" type="checkbox" data-bind="network" style="display:inline-block;" /><label for="cbRestoreNetwork" style="display:inline-block;cursor:pointer;color:white;">Restore Network Settings</label></div>`
html += `<div class="field-group" style="vertical-align:middle;width:auto;"><input id="cbRestoreMQTT" type="checkbox" data-bind="mqtt" style="display:inline-block;" /><label for="cbRestoreMQTT" style="display:inline-block;cursor:pointer;color:white;">Restore MQTT Settings</label></div>`
html += `<div class="field-group" style="vertical-align:middle;width:auto;"><input id="cbRestoreTransceiver" type="checkbox" data-bind="transceiver" style="display:inline-block;" /><label for="cbRestoreTransceiver" style="display:inline-block;cursor:pointer;color:white;">Restore Radio Settings</label></div>`;
html += '</div>';
inst.innerHTML = html;
@ -4633,7 +4634,7 @@ class Firmware {
ui.errorMessage(el, 'This file is not a valid backup file');
return;
}
if (!data.shades && !data.settings && !data.network && !data.transceiver && !data.repeaters) {
if (!data.shades && !data.settings && !data.network && !data.transceiver && !data.repeaters && !data.mqtt) {
ui.errorMessage(el, 'No restore options have been selected');
return;
}