()
| 478 | } |
| 479 | |
| 480 | function updateAutoQuickRefreshButton() { |
| 481 | const btn = elements.autoQuickRefreshSettingsBtn; |
| 482 | if (!btn) return; |
| 483 | const enabled = Boolean(autoQuickRefreshSettings?.enabled); |
| 484 | const interval = Number(autoQuickRefreshSettings?.interval_minutes || 0); |
| 485 | const runtime = autoQuickRefreshSettings?.runtime || {}; |
| 486 | if (runtime.running) { |
| 487 | btn.textContent = '⚙️ 运行中'; |
| 488 | btn.title = '定时自动一键刷新正在执行'; |
| 489 | return; |
| 490 | } |
| 491 | if (enabled && interval > 0) { |
| 492 | btn.textContent = `⚙️ 定时(${interval}m)`; |
| 493 | btn.title = `定时自动一键刷新已启用,每 ${interval} 分钟执行`; |
| 494 | return; |
| 495 | } |
| 496 | btn.textContent = '⚙️ 定时'; |
| 497 | btn.title = '定时自动一键刷新设置'; |
| 498 | } |
| 499 | |
| 500 | function fillAutoQuickRefreshForm(options = {}) { |
| 501 | if (!autoQuickRefreshSettings) return; |
no outgoing calls
no test coverage detected