fix: allow 'reboot' to application when on on battery

Having to press the power button again to wake up the device is less
annoying to the user than not being able to apply settings when the
device is on battery.

Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
This commit is contained in:
2025-12-23 17:10:59 +01:00
parent f46c045589
commit 355a8bd345
2 changed files with 6 additions and 5 deletions

View File

@@ -167,7 +167,7 @@
<div id="screen-config" class="screen">
<h2>Configuration Editor</h2>
<div id="config-container">Loading…</div>
<button id="config-save-btn" disabled>Save</button>
<button id="config-save-btn" disabled>Save &amp; Reboot</button>
</div>
<!-- PLAYLIST EDITOR SCREEN 1: list of playlists -->
@@ -316,7 +316,9 @@
return;
}
alert("Configuration saved successfully!");
alert("Configuration saved successfully, device will now reboot/shutdown! " +
"On battery, press Power button after shutdown to restart.");
await fetch('/api/v1/reboot/application', {'method': 'POST'});
} catch (err) {
alert("Error saving configuration: " + err);
}