(options = {})
| 525 | } |
| 526 | |
| 527 | async function loadAutoQuickRefreshSettings(options = {}) { |
| 528 | const silent = options.silent === true; |
| 529 | try { |
| 530 | const data = await api.get('/settings/auto-quick-refresh', { |
| 531 | requestKey: 'settings:auto-quick-refresh', |
| 532 | cancelPrevious: true, |
| 533 | retry: 1, |
| 534 | timeoutMs: 15000, |
| 535 | }); |
| 536 | autoQuickRefreshSettings = data || {}; |
| 537 | updateAutoQuickRefreshButton(); |
| 538 | if (elements.autoQuickRefreshModal?.classList.contains('active')) { |
| 539 | fillAutoQuickRefreshForm({ |
| 540 | syncSettings: !autoQuickRefreshFormDirty, |
| 541 | syncRuntime: true, |
| 542 | }); |
| 543 | } |
| 544 | } catch (error) { |
| 545 | if (!silent) { |
| 546 | toast.error('加载定时设置失败: ' + error.message); |
| 547 | } |
| 548 | } |
| 549 | } |
| 550 | |
| 551 | async function openAutoQuickRefreshModal() { |
| 552 | if (!elements.autoQuickRefreshModal) return; |
no test coverage detected