RSS bot: poll interval as radio buttons (per hour/day/week)

Replace the seconds number input with Per hour / Per day / Per week radios
(3600/86400/604800s), default per hour.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Jon
2026-06-05 23:19:27 +01:00
parent 28a4c22ef3
commit 87029f6d2a

View File

@@ -241,8 +241,12 @@
<input type="text" name="feed_url" placeholder="https://example.com/feed.xml">
</div>
<div class="field">
<label>Poll interval <span class="muted" style="font-weight:400;">(seconds)</span></label>
<input type="number" name="poll_seconds" min="30" value="300">
<label>How often to check the feed</label>
<div class="chk-grid">
<label class="chk"><input type="radio" name="rss_poll" value="3600" checked> Per hour</label>
<label class="chk"><input type="radio" name="rss_poll" value="86400"> Per day</label>
<label class="chk"><input type="radio" name="rss_poll" value="604800"> Per week</label>
</div>
</div>
</div>
<div id="crypto-fields" style="display:none;">
@@ -401,8 +405,8 @@ document.getElementById('create-form').addEventListener('submit', async (e) => {
const url = (fd.get('feed_url') || '').trim();
if (!url) { alert('Feed URL is required for an RSS bot'); return; }
config.feed_url = url;
const ps = parseInt(fd.get('poll_seconds'), 10);
if (!isNaN(ps) && ps >= 30) config.poll_seconds = ps;
const ps = parseInt(fd.get('rss_poll'), 10);
if (!isNaN(ps)) config.poll_seconds = ps;
}
if (botType === 'crypto') {
const coins = Array.from(document.querySelectorAll('#crypto-fields input[name=coin]:checked')).map(c => c.value);