nice update

This commit is contained in:
gpatruno
2026-07-16 20:23:58 +02:00
parent a0d7163464
commit 9106c8b873
47 changed files with 5183 additions and 1732 deletions
+22
View File
@@ -0,0 +1,22 @@
import { getIO } from './realtime.js';
const MAX_FEED = 40;
const feed = [];
export function getDropFeed() {
return [...feed];
}
export function pushDrop(entry) {
const event = {
id: `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
at: new Date().toISOString(),
...entry,
};
feed.unshift(event);
if (feed.length > MAX_FEED) feed.length = MAX_FEED;
const io = getIO();
if (io) io.to('feed').emit('feed:drop', event);
return event;
}