personalNote1

This commit is contained in:
richonguzman 2024-06-26 13:05:45 -04:00
parent ad1129c588
commit ab9443140b
6 changed files with 28 additions and 7 deletions

View File

@ -80,5 +80,6 @@
"backupDigiMode": false,
"rebootMode": false,
"rebootModeTime": 6
}
},
"personalNote": ""
}

View File

@ -107,9 +107,10 @@
Station
</h5>
<small
>Add your ham callsign and SSID. Optionally,
>>Add your ham callsign and SSID. Optionally,
you can leave a comment describing your
station.</small
station. In the bottom there is a field for
personal note that can only be seen in WEB GUI.</small
>
</div>
<div class="col-lg-9 col-sm-12">
@ -237,6 +238,20 @@
class="form-control"
/>
</div>
<div class="col-12 mt-3">
<label
for="personalNote"
class="form-label"
>Personal Note</label
>
<input
type="text"
name="personalNote"
id="personalNote"
class="form-control"
placeholder="A Couple of words."
/>
</div>
</div>
</div>
</div>

View File

@ -79,7 +79,7 @@ function loadSettings(settings) {
document.getElementById("beacon.path").value = settings.beacon.path;
document.getElementById("beacon.symbol").value = settings.beacon.symbol;
document.getElementById("beacon.overlay").value = settings.beacon.overlay;
document.getElementById("personalNote").value = settings.personalNote;
document.getElementById("action.symbol").value = settings.beacon.overlay + settings.beacon.symbol;
document.querySelector(".list-networks").innerHTML = "";

View File

@ -179,6 +179,8 @@ bool Configuration::readFile() {
rebootMode = data["other"]["rebootMode"].as<bool>();
rebootModeTime = data["other"]["rebootModeTime"].as<int>();
personalNote = data["personalNote"].as<String>();
int stationMode = data["stationMode"].as<int>(); // deprecated but need to specify config version
if (stationMode == 0) {
@ -350,6 +352,8 @@ void Configuration::init() {
rebootMode = false;
rebootModeTime = 0;
personalNote = "";
Serial.println("All is Written!");
}

View File

@ -114,6 +114,7 @@ public:
bool backupDigiMode;
bool rebootMode;
int rebootModeTime;
String personalNote;
std::vector<WiFi_AP> wifiAPs;
WiFi_Auto_AP wifiAutoAP;
BEACON beacon;

View File

@ -179,15 +179,15 @@ namespace WEB_Utils {
Config.ota.password = request->getParam("ota.password", true)->value();
Config.rememberStationTime = request->getParam("other.rememberStationTime", true)->value().toInt();
Config.rememberStationTime = request->getParam("other.rememberStationTime", true)->value().toInt();
Config.backupDigiMode = request->hasParam("other.backupDigiMode", true);
Config.lowPowerMode = request->hasParam("other.lowPowerMode", true);
Config.lowVoltageCutOff = request->getParam("other.lowVoltageCutOff", true)->value().toDouble();
Config.personalNote = request->getParam("personalNote", true)->value();
Config.writeFile();
AsyncWebServerResponse *response = request->beginResponse(302, "text/html", "");