Fix RSS time filters and add draggable grid layout
Normalize pub_date to ISO 8601 on insert so SQLite datetime comparisons work correctly. Migrate existing RFC 2822 dates. Change 1h filter to 12h. Add react-grid-layout with persistent drag/resize and reset button. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -85,6 +85,13 @@ async function setupRssTables(db) {
|
||||
}
|
||||
}
|
||||
|
||||
function normalizeDate(item) {
|
||||
const raw = item.isoDate || item.pubDate;
|
||||
if (!raw) return null;
|
||||
const d = new Date(raw);
|
||||
return isNaN(d.getTime()) ? null : d.toISOString();
|
||||
}
|
||||
|
||||
async function syncRssFeeds(db) {
|
||||
if (!RSSParser) return;
|
||||
const parser = new RSSParser({ timeout: 5000 });
|
||||
@@ -101,7 +108,7 @@ async function syncRssFeeds(db) {
|
||||
feed.id,
|
||||
item.title,
|
||||
item.link,
|
||||
item.pubDate || item.isoDate || null,
|
||||
normalizeDate(item),
|
||||
item.creator || item.author || null,
|
||||
(item.contentSnippet || item.content || '').substring(0, 500) || null
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user