A live bird collage card for your Home Assistant dashboard.
system was always updating, wether the user clicked cancel or not
frederikd93a4fdd83b6
diff --git a/scripts/system_controls.php b/scripts/system_controls.phpindex 08b629d1..f3aaca0d 100644--- a/scripts/system_controls.php+++ b/scripts/system_controls.php@@ -40,7 +40,7 @@ function update() {<button type="submit" name="submit" value="sudo reboot" onclick="return confirm('Are you sure you want to reboot?')">Reboot</button></div><div>- <button type="submit" name="submit" id="updatebtn" value="update_birdnet.sh" onclick="update();">Update <?php if(isset($_SESSION['behind']) && $_SESSION['behind'] != "0" && $_SESSION['behind'] != "with"){?><div class="updatenumber"><?php echo $_SESSION['behind']; ?></div><?php } ?></button>+ <button type="submit" name="submit" id="updatebtn" value="update_birdnet.sh" onclick="return update();">Update <?php if(isset($_SESSION['behind']) && $_SESSION['behind'] != "0" && $_SESSION['behind'] != "with"){?><div class="updatenumber"><?php echo $_SESSION['behind']; ?></div><?php } ?></button></div><div><button type="submit" name="submit" value="sudo shutdown now" onclick="return confirm('Are you sure you want to shutdown?')">Shutdown</button>