From 78a2a29bfc2d07f5ee92175cdf9ac9b6583efda6 Mon Sep 17 00:00:00 2001 From: sirpiglr <49359077-sirpiglr@users.noreply.replit.com> Date: Wed, 10 Dec 2025 02:51:47 +0000 Subject: [PATCH] Add federation management to the dashboard and update the federation page Add new navigation item and page structure for federation management in dashboard.html, and update federation.html with new styling and content sections for explaining the federation concept and features. Replit-Commit-Author: Agent Replit-Commit-Session-Id: aed2e46d-25bb-4b73-81a1-bb9e8437c261 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: f96502b3-64e2-454a-a892-81ab2a2f62a3 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3bdfff67-975a-46ad-9845-fbb6b4a4c4b5/aed2e46d-25bb-4b73-81a1-bb9e8437c261/MGpDued Replit-Helium-Checkpoint-Created: true --- .replit | 4 + aethex-bot/public/dashboard.html | 286 +++++++++ aethex-bot/public/federation.html | 986 +++++++++++------------------- 3 files changed, 645 insertions(+), 631 deletions(-) diff --git a/.replit b/.replit index 9585c0f..323067d 100644 --- a/.replit +++ b/.replit @@ -21,6 +21,10 @@ externalPort = 80 localPort = 8080 externalPort = 8080 +[[ports]] +localPort = 34599 +externalPort = 3000 + [workflows] runButton = "Project" diff --git a/aethex-bot/public/dashboard.html b/aethex-bot/public/dashboard.html index 2a4f5ce..780d831 100644 --- a/aethex-bot/public/dashboard.html +++ b/aethex-bot/public/dashboard.html @@ -1171,6 +1171,9 @@
+ @@ -1708,6 +1711,114 @@ + + @@ -1885,6 +1996,7 @@ case 'admin-quests': await loadAdminQuests(); break; case 'admin-achievements': await loadAdminAchievements(); break; case 'admin-shop': await loadAdminShop(); break; + case 'federation': loadFederationData(); break; } } @@ -2591,6 +2703,180 @@ } } + document.querySelectorAll('[data-fed-tab]').forEach(tab => { + tab.addEventListener('click', () => { + document.querySelectorAll('[data-fed-tab]').forEach(t => t.classList.remove('active')); + document.querySelectorAll('.fed-section').forEach(s => s.classList.add('hidden')); + tab.classList.add('active'); + document.getElementById(tab.dataset.fedTab).classList.remove('hidden'); + }); + }); + + async function loadFederationStats() { + try { + const res = await fetch('/api/federation/stats'); + const data = await res.json(); + document.getElementById('fedTotalServers').textContent = data.totalServers || 0; + document.getElementById('fedActiveBans').textContent = data.activeBans || 0; + document.getElementById('fedPendingApps').textContent = data.pendingApplications || 0; + } catch (e) { + console.error('Failed to load federation stats:', e); + } + } + + async function loadFederationServers() { + try { + const res = await fetch('/api/federation/servers'); + const data = await res.json(); + const grid = document.getElementById('fedServerGrid'); + + if (!data.servers || data.servers.length === 0) { + grid.innerHTML = 'A network of protected servers. Ban one, ban all.
-A network of protected Discord servers. When one server bans a bad actor, every federation member is protected. Ban one, ban all.
+Free protection for all members. Premium options for extra security.
+Join the federation and benefit from shared intelligence across hundreds of servers.
+ +Add Warden to your server and apply for federation membership. Get approved and you're in.
+When you ban someone for serious offenses, report them to the global ban list. Other servers are instantly protected.
+Known bad actors are automatically blocked before they can cause problems in your server.
| User | -Severity | -Reason | -Date | -
|---|---|---|---|
| Loading bans... | |||
Everything you need to keep your community safe.
+ +Shared database of confirmed bad actors across all federation servers.
+Instant alerts when known threats try to join your server.
+Browse and discover other federation member servers.
+Track user reputation across the entire federation network.
+Treaty-based membership with admin approval process.
+Categorized bans: Low, Medium, High, Critical - with tiered responses.
+| Server | -Category | -Members | -Status | -Actions | -
|---|---|---|---|---|
| Loading applications... | ||||
Free protection for everyone. Extra security for those who need it.
+ +Use /federation apply in your server to start your membership application.
+diff --git a/aethex-bot/public/federation.html b/aethex-bot/public/federation.html index 3a4a891..8c6dc0a 100644 --- a/aethex-bot/public/federation.html +++ b/aethex-bot/public/federation.html @@ -3,7 +3,7 @@
-
+