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:
@@ -241,8 +241,12 @@
|
|||||||
<input type="text" name="feed_url" placeholder="https://example.com/feed.xml">
|
<input type="text" name="feed_url" placeholder="https://example.com/feed.xml">
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label>Poll interval <span class="muted" style="font-weight:400;">(seconds)</span></label>
|
<label>How often to check the feed</label>
|
||||||
<input type="number" name="poll_seconds" min="30" value="300">
|
<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>
|
</div>
|
||||||
<div id="crypto-fields" style="display:none;">
|
<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();
|
const url = (fd.get('feed_url') || '').trim();
|
||||||
if (!url) { alert('Feed URL is required for an RSS bot'); return; }
|
if (!url) { alert('Feed URL is required for an RSS bot'); return; }
|
||||||
config.feed_url = url;
|
config.feed_url = url;
|
||||||
const ps = parseInt(fd.get('poll_seconds'), 10);
|
const ps = parseInt(fd.get('rss_poll'), 10);
|
||||||
if (!isNaN(ps) && ps >= 30) config.poll_seconds = ps;
|
if (!isNaN(ps)) config.poll_seconds = ps;
|
||||||
}
|
}
|
||||||
if (botType === 'crypto') {
|
if (botType === 'crypto') {
|
||||||
const coins = Array.from(document.querySelectorAll('#crypto-fields input[name=coin]:checked')).map(c => c.value);
|
const coins = Array.from(document.querySelectorAll('#crypto-fields input[name=coin]:checked')).map(c => c.value);
|
||||||
|
|||||||
Reference in New Issue
Block a user