From 1d31ca9672de1061b8943b393d288151a6d3356b Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Wed, 22 Apr 2026 09:54:53 +0200 Subject: [PATCH 1/6] Refactor user statistics reporting in broadcast.js - Updated the logic for retrieving unique users today to ensure only the latest records are considered, improving accuracy in user engagement metrics. - Enhanced the command table to display user age alongside their name and login count, providing more comprehensive insights into user demographics. These changes collectively improve the reporting of user statistics and enhance the clarity of the displayed data. --- server/broadcast.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/server/broadcast.js b/server/broadcast.js index 0d0ffee..25dc1a2 100644 --- a/server/broadcast.js +++ b/server/broadcast.js @@ -419,8 +419,18 @@ export function setupBroadcast(io, __dirname) { if (sub === 'today') { const day = new Date().toISOString().slice(0, 10); const dayRecords = records.filter((r) => r.day === day); - const uniqueUsersToday = Array.from(new Set(dayRecords.map((r) => r.userName))) - .sort((a, b) => a.localeCompare(b, 'de')); + const latestByUserToday = new Map(); + dayRecords + .slice() + .sort((a, b) => b.date - a.date) + .forEach((record) => { + if (!latestByUserToday.has(record.userName)) { + latestByUserToday.set(record.userName, record); + } + }); + const uniqueUsersToday = Array.from(latestByUserToday.values()) + .sort((a, b) => a.userName.localeCompare(b.userName, 'de')) + .map((r) => `${r.userName} (${r.age})`); sendCommandTable(socket, 'Statistik: Heute', ['Metrik', 'Wert'], [ ['Tag', day], ['Logins', dayRecords.length], @@ -473,12 +483,12 @@ export function setupBroadcast(io, __dirname) { sendCommandTable( socket, `Statistik: Namen (gesamt verschieden: ${new Set(records.map((r) => r.userName)).size})`, - ['Name', 'Anzahl', 'Letzter Login'], + ['Name', 'Alter', 'Anzahl', 'Letzter Login'], topNames.map(([name, count]) => { const latestRecord = records .filter((r) => r.userName === name) .sort((a, b) => b.date - a.date)[0]; - return [name, count, latestRecord ? latestRecord.timestamp : '-']; + return [name, latestRecord ? latestRecord.age : '-', count, latestRecord ? latestRecord.timestamp : '-']; }) ); return; From 1ecf7b6ba7e0702175710943c7ac6cc4ef7f4434 Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Mon, 27 Apr 2026 14:24:42 +0200 Subject: [PATCH 2/6] Add Ratgeber section with new routes and links - Introduced a new "Ratgeber" link in ImprintContainer.vue for better user navigation. - Added multiple routes for the Ratgeber section, including GuideHubView, GuideFirstMessageView, GuideProfileView, GuideSafetyView, and GuideRedFlagsView, enhancing content accessibility. - Implemented SEO metadata for the new routes to improve search engine visibility and user engagement. These changes collectively enhance the site's informational resources and improve navigation for users seeking guidance on chat-related topics. --- client/src/components/ImprintContainer.vue | 1 + client/src/router/index.js | 94 ++++++++++++++++ client/src/views/ChatView.vue | 2 + client/src/views/GuideFirstMessageView.vue | 82 ++++++++++++++ client/src/views/GuideHubView.vue | 118 +++++++++++++++++++++ client/src/views/GuideProfileView.vue | 82 ++++++++++++++ client/src/views/GuideRedFlagsView.vue | 74 +++++++++++++ client/src/views/GuideSafetyView.vue | 77 ++++++++++++++ 8 files changed, 530 insertions(+) create mode 100644 client/src/views/GuideFirstMessageView.vue create mode 100644 client/src/views/GuideHubView.vue create mode 100644 client/src/views/GuideProfileView.vue create mode 100644 client/src/views/GuideRedFlagsView.vue create mode 100644 client/src/views/GuideSafetyView.vue diff --git a/client/src/components/ImprintContainer.vue b/client/src/components/ImprintContainer.vue index 6361b49..62211b9 100644 --- a/client/src/components/ImprintContainer.vue +++ b/client/src/components/ImprintContainer.vue @@ -1,6 +1,7 @@ @@ -53,11 +51,16 @@ onMounted(async () => {