From 3521facb84364be6ba6db5e1b2b3203db46898b7 Mon Sep 17 00:00:00 2001 From: rubn Date: Sun, 15 Feb 2026 22:16:04 +0100 Subject: [PATCH] :construction: Persist auto-refresh interval setting --- gui/bastille_manager_gui.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gui/bastille_manager_gui.php b/gui/bastille_manager_gui.php index 7243760..7ac6f8f 100644 --- a/gui/bastille_manager_gui.php +++ b/gui/bastille_manager_gui.php @@ -422,6 +422,13 @@ $(window).on("load", function() { disableactionbuttons(true); $("#iform").submit(function() { spinner(); }); $(".spin").click(function() { spinner(); }); + + // Attempt to load the previously saved interval + var savedInterval = localStorage.getItem('bastille_refresh_interval'); + if (savedInterval !== null) { + $("#refresh-interval").val(savedInterval); + autoRefresh.interval = parseInt(savedInterval); + } // --- REFRESH INIT --- startAutoRefresh(); @@ -429,8 +436,10 @@ $(window).on("load", function() { updateJailTable(); }); + // save interval value in local storage $("#refresh-interval").change(function() { var val = parseInt($(this).val()); + localStorage.setItem('bastille_refresh_interval', val); stopAutoRefresh(); if (val > 0) { autoRefresh.interval = val;