diff --git a/app/static/js/keys_status.js b/app/static/js/keys_status.js index d5a54ae..bdcf99b 100644 --- a/app/static/js/keys_status.js +++ b/app/static/js/keys_status.js @@ -1188,48 +1188,6 @@ function initializeKeySelectionListeners() { setupEventListenersForList("invalidKeys", "invalid"); } -function initializeAutoRefreshControls() { - const autoRefreshToggle = document.getElementById("autoRefreshToggle"); - const autoRefreshIntervalTime = 60000; // 60秒 - let autoRefreshTimer = null; - - function startAutoRefresh() { - if (autoRefreshTimer) return; - console.log("启动自动刷新..."); - showNotification("自动刷新已启动", "info", 2000); - autoRefreshTimer = setInterval(() => { - console.log("自动刷新 keys_status 页面..."); - location.reload(); - }, autoRefreshIntervalTime); - } - - function stopAutoRefresh() { - if (autoRefreshTimer) { - console.log("停止自动刷新..."); - showNotification("自动刷新已停止", "info", 2000); - clearInterval(autoRefreshTimer); - autoRefreshTimer = null; - } - } - - if (autoRefreshToggle) { - const isAutoRefreshEnabled = - localStorage.getItem("autoRefreshEnabled") === "true"; - autoRefreshToggle.checked = isAutoRefreshEnabled; - if (isAutoRefreshEnabled) { - startAutoRefresh(); - } - autoRefreshToggle.addEventListener("change", () => { - if (autoRefreshToggle.checked) { - localStorage.setItem("autoRefreshEnabled", "true"); - startAutoRefresh(); - } else { - localStorage.setItem("autoRefreshEnabled", "false"); - stopAutoRefresh(); - } - }); - } -} // Debounce function function debounce(func, delay) { @@ -1485,7 +1443,6 @@ document.addEventListener("DOMContentLoaded", () => { initializeKeyFilterControls(); initializeGlobalBatchVerificationHandlers(); initializeKeySelectionListeners(); - initializeAutoRefreshControls(); initializeKeyPaginationAndSearch(); // This will also handle initial display registerServiceWorker(); initializeDropdownMenu(); // 初始化下拉菜单 diff --git a/app/templates/keys_status.html b/app/templates/keys_status.html index 6f8661d..595878a 100644 --- a/app/templates/keys_status.html +++ b/app/templates/keys_status.html @@ -1103,24 +1103,6 @@ endblock %} {% block head_extra_styles %}