From 8bd3876520e0e66904dcda3f9138202c7db33483 Mon Sep 17 00:00:00 2001 From: Medicopter117 Date: Sat, 31 Jan 2026 10:24:52 +0100 Subject: [PATCH] feat: Implement initial bot core setup and web dashboard components. --- docs/source/dev_guide/index.rst | 236 +------------- src/bot/cogs/moderation/moderation.py | 10 +- src/bot/cogs/moderation/warn.py | 11 +- src/bot/cogs/user/settings.py | 128 ++++++++ src/bot/core/__init__.py | 26 +- src/bot/core/constants.py | 38 +++ src/bot/core/dashboard.py | 8 +- src/web/App.tsx | 65 ++-- src/web/components/CTA.tsx | 73 ++--- src/web/components/FeatureCard.tsx | 100 +++--- src/web/components/Features.tsx | 28 +- src/web/components/Footer.tsx | 243 +++++++-------- src/web/components/Hero.tsx | 135 ++++---- src/web/components/Navbar.tsx | 103 ++++--- src/web/index.css | 271 ++++++++++------ src/web/pages/Datenschutz.tsx | 286 +++++++++-------- src/web/pages/Impressum.tsx | 277 ++++++++++------- src/web/pages/License.tsx | 99 +++--- src/web/pages/NotFound.tsx | 238 +++++++++++--- src/web/pages/Nutzungsbedingungen.tsx | 428 ++++++++++++-------------- src/web/pages/PluginsPage.tsx | 215 ++++++++----- src/web/pages/Status.tsx | 32 +- 22 files changed, 1741 insertions(+), 1309 deletions(-) create mode 100644 src/bot/core/constants.py diff --git a/docs/source/dev_guide/index.rst b/docs/source/dev_guide/index.rst index b80075d..b447d5c 100644 --- a/docs/source/dev_guide/index.rst +++ b/docs/source/dev_guide/index.rst @@ -1,234 +1,4 @@ -=============================== -đŸ‘šâ€đŸ’» Developer Guide -=============================== +Developer Guide +======================= -**Welcome to the ManagerX Developer Guide!** - -This comprehensive documentation is your resource for understanding ManagerX's architecture, extending the bot, deploying it to production, and contributing to the project. Whether you're building a new feature, self-hosting ManagerX, or simply curious about how it works, you'll find everything you need here. - -.. note:: - **New to ManagerX?** Start with :doc:`getting_started/index` to set up your development environment. - -.. important:: - This project is under active development. Features and APIs may change. Check back regularly for updates! - ---- - -🚀 Quick Start Paths -==================== - -**Want to get up and running immediately?** - -1. Install dependencies → :doc:`installation/index` -2. Understand the structure → :doc:`project_structure/index` -3. Learn the architecture → :doc:`architecture/index` -4. Start coding → :doc:`bot_development/index` - -**Deploying to production?** - -1. Review deployment options → :doc:`deployment/index` -2. Set up your server → :doc:`deployment/index` -3. Configure monitoring → :doc:`deployment/index` -4. Establish backups → :doc:`database/index` - -**Want to contribute?** - -1. Fork the repository -2. Read :doc:`contributing/index` -3. Create a feature branch -4. Follow code style → :doc:`contributing/index` -5. Write tests → :doc:`testing/index` -6. Submit a pull request! - ---- - -📚 Documentation Structure -=========================== - -**Getting Started** - -- :doc:`getting_started/index` — Installation, setup, first steps -- :doc:`installation/index` — Detailed installation instructions -- :doc:`project_structure/index` — Repository organization - -**Understanding ManagerX** - -- :doc:`architecture/index` — System design and components -- :doc:`database/index` — SQLite database schema and operations -- :doc:`bot_development/index` — Building bot features and cogs -- :doc:`api_development/index` — Creating API endpoints - -**Development** - -- :doc:`testing/index` — Unit tests, integration tests, testing strategy -- :doc:`deployment/index` — Production deployment, hosting options -- :doc:`contributing/index` — Contribution guidelines, PR process -- :doc:`troubleshooting/index` — Debugging and common issues - ---- - -đŸ—ïž Architecture Overview -========================= - -ManagerX consists of three main components: - -**Bot Core (Python)** - -Discord.py/py-cord based bot with modular cog system. Handles Discord events, commands, and business logic. - -- Location: ``src/bot/`` -- Main entry: ``main.py`` - -**API Server (FastAPI)** - -REST API providing bot data to frontend and external services. - -- Location: ``src/api/`` -- Port: 8040 -- Runs in same process as bot - -**Web Dashboard (React)** - -Modern TypeScript/React frontend with real-time statistics and management interface. - -- Location: ``src/web/`` -- Port: 8080 -- Built with Vite - -See :doc:`architecture/index` for detailed architecture documentation. - ---- - -đŸ› ïž Development Environment -============================ - -**Prerequisites:** - -- Python 3.11+ -- Node.js 18+ (for web development) -- Git -- SQLite3 (usually included with Python) - -**Quick Setup:** - -.. code-block:: bash - - # Clone repository - git clone https://github.com/ManagerX-Development/ManagerX.git - cd ManagerX - - # Create virtual environment - python -m venv .venv - source .venv/bin/activate # On Windows: .venv\\Scripts\\activate - - # Install dependencies - pip install -r requirements/bot_req.txt - - # Set up configuration - cp config/config.yaml config/config.local.yaml - # Edit config/config.local.yaml with your settings - - # Run the bot - python main.py - -For detailed setup, see :doc:`getting_started/index`. - ---- - -📖 Common Development Tasks -============================ - -**Creating a New Command** - -See :doc:`bot_development/index` for complete example - -**Adding a Database Table** - -See :doc:`database/index` for schema modifications - -**Creating an API Endpoint** - -See :doc:`api_development/index` for REST endpoint examples - -**Writing Tests** - -See :doc:`testing/index` for testing patterns - -**Deploying to Production** - -See :doc:`deployment/index` for deployment procedures - ---- - -đŸ€ Contributing -================ - -We welcome contributions! Whether it's bug fixes, new features, or documentation improvements: - -1. Fork the repository -2. Create a feature branch: ``git checkout -b feature/amazing-feature`` -3. Follow code style (see :doc:`contributing/index`) -4. Write or update tests (see :doc:`testing/index`) -5. Commit with clear messages (see :doc:`contributing/index`) -6. Push and create a Pull Request - -See :doc:`contributing/index` for complete contribution guidelines. - ---- - -📊 Project Statistics -====================== - -- **Language:** Python (bot) + TypeScript (web) -- **Framework:** discord.py + FastAPI + React -- **Database:** SQLite -- **Lines of Code:** 10,000+ -- **Cogs/Modules:** 10+ -- **API Endpoints:** 20+ -- **Commands:** 50+ - ---- - -🔗 Quick Navigation -==================== - -Key Sections: - -.. toctree:: - :maxdepth: 1 - :caption: Getting Started - :hidden: - - getting_started - installation - project_structure - -.. toctree:: - :maxdepth: 1 - :caption: Core Concepts - :hidden: - - architecture - design_patterns - database_design - -.. toctree:: - :maxdepth: 1 - :caption: Development - :hidden: - - bot_development - api_development - frontend_development - testing - -.. toctree:: - :maxdepth: 1 - :caption: Community - :hidden: - - contributing - code_style - deployment - - \ No newline at end of file +Welcome to the \ No newline at end of file diff --git a/src/bot/cogs/moderation/moderation.py b/src/bot/cogs/moderation/moderation.py index de7e7cc..3f67077 100644 --- a/src/bot/cogs/moderation/moderation.py +++ b/src/bot/cogs/moderation/moderation.py @@ -14,6 +14,14 @@ import timedelta from discord.ui import Container from discord import SlashCommandGroup + +# Importiere zentrale Konstanten +from src.bot.core import ( + SUCCESS_COLOR, ERROR_COLOR, WARN_COLOR, INFO_COLOR, + emoji_yes, emoji_no, emoji_warn, emoji_info, + emoji_member, emoji_staff, emoji_summary, emoji_slowmode, + AUTHOR, FLOOTER +) # ─────────────────────────────────────────────── # >> Cogs # ─────────────────────────────────────────────── @@ -126,7 +134,7 @@ def _create_moderation_embed(self, action: str, moderator: discord.Member, targe if additional_info: embed.add_field(name=f"{emoji_summary} × ZusĂ€tzlich", value=additional_info, inline=False) if target: - embed.set_footer(text=f"User ID: {target.id}") + embed.set_footer(text=f"User ID: {target.id} | {FLOOTER}") else: embed.set_footer(text=FLOOTER) return embed diff --git a/src/bot/cogs/moderation/warn.py b/src/bot/cogs/moderation/warn.py index c56dd7f..005e161 100644 --- a/src/bot/cogs/moderation/warn.py +++ b/src/bot/cogs/moderation/warn.py @@ -7,10 +7,19 @@ from discord import slash_command, Option import os import datetime +import datetime import ezcord import asyncio from typing import Optional +# Importiere zentrale Konstanten +from src.bot.core import ( + SUCCESS_COLOR, ERROR_COLOR, WARN_COLOR, INFO_COLOR, + emoji_yes, emoji_no, emoji_warn, emoji_info, + emoji_member, emoji_staff, emoji_summary, emoji_slowmode, + emoji_circleinfo, AUTHOR, FLOOTER +) + # ─────────────────────────────────────────────── # >> Cogs @@ -98,7 +107,7 @@ def _create_warn_embed(self, action: str, moderator: discord.Member, def _create_error_embed(self, title: str, message: str) -> discord.Embed: """Erstellt ein einheitliches Error-Embed""" - embed = discord.Embed(title=title, color=ERROR_COLOR) + embed = discord.Embed(title=title, color=ERROR_COLOR, timestamp=datetime.datetime.now(datetime.timezone.utc)) embed.set_author(name=AUTHOR) embed.add_field(name=f"{emoji_no} {title}", value=message, inline=False) embed.set_footer(text=FLOOTER) diff --git a/src/bot/cogs/user/settings.py b/src/bot/cogs/user/settings.py index 381ff7b..5f8bdd6 100644 --- a/src/bot/cogs/user/settings.py +++ b/src/bot/cogs/user/settings.py @@ -4,6 +4,10 @@ import ezcord from mx_handler import TranslationHandler +import os +from src.bot.core.constants import ERROR_COLOR, SUCCESS_COLOR, emoji_warn, emoji_delete, AUTHOR, FOOTER +from DevTools import StatsDB, WarnDatabase, NotesDatabase, LevelDatabase +import sqlite3 class Settings(ezcord.Cog): @@ -14,6 +18,8 @@ class Settings(ezcord.Cog): language = user.create_subgroup( "language") + data = user.create_subgroup("data", "Manage your data") + AVAILABLE_LANGUAGES = { "de": "Deutsch đŸ‡©đŸ‡Ș", "en": "English 🇬🇧" @@ -103,6 +109,128 @@ async def list_languages(self, ctx: discord.ApplicationContext): response_text = f"**Available Languages:**\n{languages_list}" await ctx.respond(response_text, ephemeral=True) + @data.command( + name="delete", + description="Lösche alle deine Daten von ManagerX permanent." + ) + async def delete_all_data(self, ctx: discord.ApplicationContext): + """Startet den doppelten BestĂ€tigungsprozess zum Löschen aller User-Daten.""" + + embed = discord.Embed( + title=f"{emoji_warn} ACHTUNG: Datenlöschung", + description=( + "Bist du sicher, dass du alle deine Daten löschen möchtest?\n\n" + "**Was gelöscht wird:**\n" + "‱ XP, Level und Statistiken (Global & Server)\n" + "‱ Deine persönlichen Einstellungen\n\n" + "**Was NICHT gelöscht wird:**\n" + "‱ Moderationsdaten (Warnungen & Notizen)\n" + "*Hinweis: ManagerX ist es nicht gestattet, Moderationsdaten zu löschen.*\n\n" + "⚠ **WICHTIG:** Dieser Vorgang ist **unwiderruflich**. " + "Deine persönlichen Daten sind **fĂŒr immer** weg!" + ), + color=ERROR_COLOR + ) + embed.set_author(name=AUTHOR) + embed.set_footer(text=FOOTER) + + view = DeletionView(ctx.author.id, self.bot) + await ctx.respond(embed=embed, view=view, ephemeral=True) + +class DeletionView(discord.ui.View): + def __init__(self, user_id, bot): + super().__init__(timeout=60) + self.user_id = user_id + self.bot = bot + + @discord.ui.button(label="Daten löschen", style=discord.ButtonStyle.danger, emoji="đŸ—‘ïž") + async def delete_button(self, button: discord.ui.Button, interaction: discord.Interaction): + if interaction.user.id != self.user_id: + return await interaction.response.send_message("Das ist nicht dein MenĂŒ!", ephemeral=True) + + embed = discord.Embed( + title="⚠ LETZTE BESTÄTIGUNG", + description=( + "Bist du wirklich ABSOLUT sicher?\n\n" + "Alle deine Statistiken, Level und Einstellungen werden **permanent** gelöscht.\n" + "ManagerX wird alle persönlichen Informationen ĂŒber dich vergessen.\n\n" + "**WICHTIG:** Moderationsdaten (Warns/Notes) dĂŒrfen vom Bot nicht gelöscht werden und bleiben erhalten." + ), + color=ERROR_COLOR + ) + embed.set_author(name=AUTHOR) + embed.set_footer(text=FOOTER) + + view = DeletionConfirmationView(self.user_id, self.bot) + await interaction.response.edit_message(embed=embed, view=view) + +class DeletionConfirmationView(discord.ui.View): + def __init__(self, user_id, bot): + super().__init__(timeout=60) + self.user_id = user_id + self.bot = bot + + @discord.ui.button(label="JA, ALLES LÖSCHEN", style=discord.ButtonStyle.danger, emoji="đŸ”„") + async def confirm_button(self, button: discord.ui.Button, interaction: discord.Interaction): + if interaction.user.id != self.user_id: + return await interaction.response.send_message("Das ist nicht dein MenĂŒ!", ephemeral=True) + + # Deletion logic implementation + try: + # Paths to databases + stats_db_path = "data/stats.db" + level_db_path = "data/levelsystem.db" + warn_db_path = "src/bot/cogs/moderation/Datenbanken/warns.db" + notes_db_path = "data/data/notes.db" + + # 1. Stats & Level + # StatsDB cleanup + if os.path.exists(stats_db_path): + conn = sqlite3.connect(stats_db_path) + cursor = conn.cursor() + tables = ["messages", "voice_sessions", "global_user_levels", "daily_stats", "user_achievements", "active_voice_sessions"] + for table in tables: + cursor.execute(f"DELETE FROM {table} WHERE user_id = ?", (self.user_id,)) + conn.commit() + conn.close() + + # LevelDatabase cleanup + if os.path.exists(level_db_path): + conn = sqlite3.connect(level_db_path) + cursor = conn.cursor() + tables = ["user_levels", "xp_boosts", "achievements", "temporary_roles"] + for table in tables: + cursor.execute(f"DELETE FROM {table} WHERE user_id = ?", (self.user_id,)) + conn.commit() + conn.close() + + # 2. Settings (using the existing reset method if available) + if hasattr(self.bot, 'settings_db'): + if hasattr(self.bot.settings_db, 'reset_user_settings'): + self.bot.settings_db.reset_user_settings(self.user_id) + elif hasattr(self.bot.settings_db, 'delete_user_data'): # Fallback to original code's preference + self.bot.settings_db.delete_user_data(self.user_id) + + # 3. Moderationsdaten (Warns & Notes) bleiben bestehen (User-Wunsch/Wichtigkeit) + pass + + except Exception as e: + # Log error but proceed with message + print(f"Error during manual data deletion for {self.user_id}: {e}") + + embed = discord.Embed( + title="✅ Daten erfolgreich gelöscht", + description="Alle deine Daten wurden permanent aus unserem System entfernt.", + color=SUCCESS_COLOR + ) + embed.set_footer(text=FOOTER) + + await interaction.response.edit_message(embed=embed, view=None) + + @discord.ui.button(label="Abbrechen", style=discord.ButtonStyle.secondary) + async def cancel_button(self, button: discord.ui.Button, interaction: discord.Interaction): + await interaction.response.edit_message(content="Vorgang abgebrochen. Deine Daten sind sicher.", embed=None, view=None) + def setup(bot): """Setup function to add the cog to the bot.""" bot.add_cog(Settings(bot)) \ No newline at end of file diff --git a/src/bot/core/__init__.py b/src/bot/core/__init__.py index 61d58e5..5e7678d 100644 --- a/src/bot/core/__init__.py +++ b/src/bot/core/__init__.py @@ -11,6 +11,7 @@ from .database import DatabaseManager from .dashboard import DashboardTask from .utils import print_logo, format_uptime, truncate_text +from .constants import * __all__ = [ 'ConfigLoader', @@ -21,5 +22,28 @@ 'DashboardTask', 'print_logo', 'format_uptime', - 'truncate_text' + 'truncate_text', + 'SUCCESS_COLOR', + 'ERROR_COLOR', + 'WARN_COLOR', + 'INFO_COLOR', + 'emoji_yes', + 'emoji_no', + 'emoji_warn', + 'emoji_info', + 'emoji_forbidden', + 'emoji_member', + 'emoji_staff', + 'emoji_summary', + 'emoji_slowmode', + 'emoji_channel', + 'emoji_moderator', + 'emoji_statistics', + 'emoji_annoattention', + 'emoji_owner', + 'emoji_delete', + 'emoji_circleinfo', + 'AUTHOR', + 'FLOOTER', + 'FOOTER' ] \ No newline at end of file diff --git a/src/bot/core/constants.py b/src/bot/core/constants.py new file mode 100644 index 0000000..3e4498f --- /dev/null +++ b/src/bot/core/constants.py @@ -0,0 +1,38 @@ +""" +ManagerX - Constants +==================== + +Zentrale Definition von Emojis, Farben und anderen Konstanten. +""" + +import discord + +# --- Farben --- +SUCCESS_COLOR = discord.Color.green() +ERROR_COLOR = discord.Color.red() +WARN_COLOR = discord.Color.orange() +INFO_COLOR = discord.Color.blue() + +# --- Emojis (Standard-Sets) --- +# Hinweis: Diese können spĂ€ter durch Custom-Emojis ersetzt werden +emoji_yes = "✅" +emoji_no = "❌" +emoji_warn = "⚠" +emoji_info = "â„č" +emoji_forbidden = "đŸš«" +emoji_member = "đŸ‘€" +emoji_staff = "đŸ›Ąïž" +emoji_summary = "📝" +emoji_slowmode = "⏳" +emoji_channel = "📁" +emoji_moderator = "👼" +emoji_statistics = "📊" +emoji_annoattention = "📣" +emoji_owner = "👑" +emoji_delete = "đŸ—‘ïž" +emoji_circleinfo = "â„č" + +# --- Texte --- +AUTHOR = "ManagerX Network" +FLOOTER = "Powered by OPPRO.NET Network" # Typo im Original ("FLOOTER"), behalte es fĂŒr KompatibilitĂ€t oder korrigiere es +FOOTER = "Powered by OPPRO.NET Network" diff --git a/src/bot/core/dashboard.py b/src/bot/core/dashboard.py index e39f610..00ea0d8 100644 --- a/src/bot/core/dashboard.py +++ b/src/bot/core/dashboard.py @@ -57,7 +57,7 @@ async def _update_stats(self): json.dump(stats, f, indent=4, ensure_ascii=False) except Exception as e: - logger.error(Category.BOT, f"Dashboard-Update fehlgeschlagen: {e}") + logger.error(Category.DISCORD_BOT, f"Dashboard-Update fehlgeschlagen: {e}") def _get_uptime(self) -> str: """Berechnet die Bot-Uptime""" @@ -77,19 +77,19 @@ def register(self): """Registriert den Task (startet ihn noch nicht)""" # Startzeit speichern self.bot.start_time = datetime.now() - logger.info(Category.DISCORD_BOT, "Dashboard-Task registriert") + def start(self): """Startet den Dashboard-Update-Task""" if self._task and not self._task.is_running(): self._task.start() - logger.success(Category.DISCORD_BOT, "Dashboard-Task gestartet") + def stop(self): """Stoppt den Dashboard-Update-Task""" if self._task and self._task.is_running(): self._task.cancel() - logger.info(Category.DISCORD_BOT, "Dashboard-Task gestoppt") + def is_running(self) -> bool: """ diff --git a/src/web/App.tsx b/src/web/App.tsx index 35d4a00..beabac2 100644 --- a/src/web/App.tsx +++ b/src/web/App.tsx @@ -1,17 +1,42 @@ +import { lazy, Suspense } from "react"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { BrowserRouter, Routes, Route, useLocation } from "react-router-dom"; import { motion, AnimatePresence } from "framer-motion"; -import Index from "./pages/Index"; -import NotFound from "./pages/NotFound"; -import Impressum from "./pages/Impressum"; -import Datenschutz from "./pages/Datenschutz"; -import Nutzungsbedingungen from "./pages/Nutzungsbedingungen"; -import PluginsPage from "./pages/PluginsPage"; -import Status from "./pages/Status"; -import { License } from "./pages/License"; + +// Lazy load all route components for better performance +const Index = lazy(() => import("./pages/Index")); +const NotFound = lazy(() => import("./pages/NotFound")); +const Impressum = lazy(() => import("./pages/Impressum")); +const Datenschutz = lazy(() => import("./pages/Datenschutz")); +const Nutzungsbedingungen = lazy(() => import("./pages/Nutzungsbedingungen")); +const PluginsPage = lazy(() => import("./pages/PluginsPage")); +const Status = lazy(() => import("./pages/Status")); +const License = lazy(() => import("./pages/License").then(module => ({ default: module.License }))); const queryClient = new QueryClient(); +// Loading fallback component +const PageLoader = () => ( +
+
+ +
+ +

LĂ€dt...

+
+
+); + const AppContent = () => { const location = useLocation(); @@ -23,20 +48,22 @@ const AppContent = () => { animate={{ opacity: 1 }} exit={{ opacity: 0 }} transition={{ - duration: 0.6, + duration: 0.25, // Reduced from 0.4 for even snappier transitions ease: "easeInOut", }} > - - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - + }> + + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + + ); diff --git a/src/web/components/CTA.tsx b/src/web/components/CTA.tsx index f11b04f..d65bd6f 100644 --- a/src/web/components/CTA.tsx +++ b/src/web/components/CTA.tsx @@ -13,39 +13,41 @@ export const CTA = memo(function CTA() { return (
{/* Premium Background */} -
-
-
+
+
+
- + + - - 100% Kostenlos & Open Source + + 100% Kostenlos & Open Source - Bereit fĂŒr das - nĂ€chste Level - ? + nĂ€chste Level - FĂŒge ManagerX jetzt zu deinem Server hinzu und erlebe die moderne Discord Server-Verwaltung mit 90 innovativen Slash-Commands. + FĂŒge ManagerX jetzt zu deinem Server hinzu und erlebe die moderne Discord Server-Verwaltung mit ĂŒber 90 innovativen Befehlen. - - + Bot einladen - + - - + Support Server @@ -89,23 +91,24 @@ export const CTA = memo(function CTA() { {/* Bottom Stats */} - {stats.map((stat, idx) => ( - -
+
{stat.value}
-
+
{stat.label}
diff --git a/src/web/components/FeatureCard.tsx b/src/web/components/FeatureCard.tsx index 2e37368..3ecd813 100644 --- a/src/web/components/FeatureCard.tsx +++ b/src/web/components/FeatureCard.tsx @@ -12,80 +12,94 @@ interface FeatureCardProps { } const categoryColors = { - moderation: "text-red-400", - community: "text-purple-400", - social: "text-blue-400", - interactive: "text-yellow-400", + moderation: "text-[hsl(var(--moderation))]", + community: "text-[hsl(var(--community))]", + social: "text-[hsl(var(--social))]", + interactive: "text-[hsl(var(--interactive))]", }; const categoryBgColors = { - moderation: "bg-red-500/10", - community: "bg-purple-500/10", - social: "bg-blue-500/10", - interactive: "bg-yellow-500/10", + moderation: "bg-[hsl(var(--moderation)/0.15)]", + community: "bg-[hsl(var(--community)/0.15)]", + social: "bg-[hsl(var(--social)/0.15)]", + interactive: "bg-[hsl(var(--interactive)/0.15)]", }; -export const FeatureCard = memo(function FeatureCard({ - icon: Icon, - title, - features, - category, - delay = 0 +const categoryGlows = { + moderation: "shadow-[hsl(var(--moderation)/0.2)]", + community: "shadow-[hsl(var(--community)/0.2)]", + social: "shadow-[hsl(var(--social)/0.2)]", + interactive: "shadow-[hsl(var(--interactive)/0.2)]", +}; + +export const FeatureCard = memo(function FeatureCard({ + icon: Icon, + title, + features, + category, + delay = 0 }: FeatureCardProps) { return ( + {/* Dynamic Glow Orb */} +
+ {/* Header */} -
- + - +
+
- - {title} - -
+ +
{features.map((feature, index) => ( - +
- - {feature} +
+ {feature}
))}
+ + {/* Playful hover line */} +
); }); diff --git a/src/web/components/Features.tsx b/src/web/components/Features.tsx index 456a729..13713ea 100644 --- a/src/web/components/Features.tsx +++ b/src/web/components/Features.tsx @@ -1,10 +1,10 @@ import { memo } from "react"; import { motion } from "framer-motion"; import { FeatureCard } from "./FeatureCard"; -import { - Shield, +import { + Shield, Award, - Globe, + Globe, Gamepad2, Sparkles } from "lucide-react"; @@ -71,42 +71,42 @@ export const Features = memo(function Features() {
- +
{/* Section Header */} - - + Über 90 innovative Befehle - - Alles, was du wirklich brauchst - Ein Bot fĂŒr alle deine Server-BedĂŒrfnisse. Moderation, Engagement, Social Features und interaktive Tools. @@ -122,7 +122,7 @@ export const Features = memo(function Features() { title={category.title} features={category.features} category={category.category} - delay={index * 0.1} + delay={index * 0.05} // Reduced from 0.1 for faster animations /> ))}
diff --git a/src/web/components/Footer.tsx b/src/web/components/Footer.tsx index f68382d..ebcf529 100644 --- a/src/web/components/Footer.tsx +++ b/src/web/components/Footer.tsx @@ -10,38 +10,39 @@ const socialLinks = [ export const Footer = memo(function Footer() { return ( -
diff --git a/src/web/pages/NotFound.tsx b/src/web/pages/NotFound.tsx index 839091d..144d887 100644 --- a/src/web/pages/NotFound.tsx +++ b/src/web/pages/NotFound.tsx @@ -1,7 +1,7 @@ import { useLocation, Link } from "react-router-dom"; import { useEffect } from "react"; import { motion } from "framer-motion"; -import { Shield, Sparkles, Home, Terminal } from "lucide-react"; +import { Shield, Home, Terminal, Sparkles, AlertTriangle } from "lucide-react"; const NotFound = () => { const location = useLocation(); @@ -10,86 +10,234 @@ const NotFound = () => { console.error("404 Error: User attempted to access non-existent route:", location.pathname); }, [location.pathname]); + // Floating particles animation - reduced from 20 to 8 for better performance + const particles = Array.from({ length: 8 }, (_, i) => ({ + id: i, + x: Math.random() * 100, + y: Math.random() * 100, + delay: Math.random() * 2, + duration: 3 + Math.random() * 2, + })); + return ( -
- {/* --- ORIGINAL HERO BACKGROUND --- */} +
+ {/* Enhanced Background */}
- - {/* Simple gradient orbs */} -
-
- + + {/* Animated gradient orbs - Optimized for legacy hardware */} + + + + {/* Floating particles */} + {particles.map((particle) => ( + + ))} + {/* Grid Pattern */} -
+
- - {/* --- ORIGINAL HERO LOGO --- */} + + {/* Logo with enhanced animation */}
-
+ -
-
- 404 -
+ + + 404 +
- {/* --- ORIGINAL HERO TITLE STYLE --- */} - - Error - 404 - + + + 404 + + + + + Route Not Found + + - {/* --- DESCRIPTION --- */} + {/* Description */} - Dieser Pfad ist im ManagerX Netzwerk nicht registriert. Kehre zurĂŒck zur Zentrale. + Dieser Pfad ist im ManagerX Netzwerk nicht registriert. Kehre zurĂŒck zur Zentrale. - {/* --- CTA BUTTON (HERO STYLE) --- */} + {/* CTA Button */} - - - ZurĂŒck zur Home - → - + + +
+ + ZurĂŒck zur Home + + → + + + - {/* --- TERMINAL FOOTER --- */} - - Path: {location.pathname} + Path: {location.pathname} | - Status: 404 NOT FOUND + Status: 404 NOT FOUND + + {/* Decorative sparkles */} +
+ + + +
+
+ + + +
diff --git a/src/web/pages/Nutzungsbedingungen.tsx b/src/web/pages/Nutzungsbedingungen.tsx index 953c688..8fc629a 100644 --- a/src/web/pages/Nutzungsbedingungen.tsx +++ b/src/web/pages/Nutzungsbedingungen.tsx @@ -1,226 +1,179 @@ import { memo } from "react"; import { Link } from "react-router-dom"; -import { ArrowLeft, FileText, Mail, Github, Shield } from "lucide-react"; +import { ArrowLeft, FileText, Mail, Github, Shield, CheckCircle, Zap, AlertTriangle, Scale, Lock, RefreshCw, HelpCircle, Code2, LogOut, Database } from "lucide-react"; import { Navbar } from "../components/Navbar"; import { Footer } from "../components/Footer"; import { motion } from "framer-motion"; -const legalSections = [ - { - title: "1. Geltungsbereich", - content: "Diese Nutzungsbedingungen regeln die Verwendung des Discord-Bots ManagerX sowie dieser Website. Mit der Nutzung des Bots, der Website oder des Quellcodes erklÀrst du dich mit diesen Bedingungen einverstanden.", - }, - { - title: "2. Lizenz & Open Source", - content: ( -
-

ManagerX wird unter der GNU General Public License v3.0 (GPL-3.0) lizenziert.

-
    -
  • Quellcode darf frei eingesehen, modifiziert und verbreitet werden
  • -
  • Modifikationen mĂŒssen ebenfalls unter GPL-3.0 lizenziert werden
  • -
  • Kommerzielles Hosting ist gestattet, Quellcode muss verfĂŒgbar sein
  • -
-
- ), - }, - { - title: "3. Bot-Nutzung", - content: ( -
-

ManagerX darf auf Discord-Servern genutzt werden, sofern:

-
    -
  • Sie Admin-Rechte auf dem Server haben
  • -
  • Die Nutzung den Discord Terms of Service entspricht
  • -
  • Sie keine illegalen oder schĂ€dlichen AktivitĂ€ten durchfĂŒhren
  • -
  • Sie keine Spam-, Phishing- oder Hacking-Funktionen implementieren
  • -
-
- ), - }, - { - title: "4. Verbotene Nutzung", - content: ( -
-

Folgende AktivitÀten sind streng untersagt:

-
    -
  • Reverse Engineering zu böswilligen Zwecken
  • -
  • DDoS-Attacken oder SicherheitsverstĂ¶ĂŸe
  • -
  • Automatisierte Spam- oder Harassment-Kampagnen
  • -
  • Verbreitung von Malware oder Exploits
  • -
  • VerstĂ¶ĂŸe gegen Discord Community Guidelines
  • -
-

Konsequenz: Sofortiger Ausschluss und mögliche Benachrichtigung von Discord & Strafverfolgungsbehörden

-
- ), - }, - { - title: "5. Haftungsausschluss", - content: ( -
-

OPPRO.NET Network und die Betreiber von ManagerX ĂŒbernehmen keine Haftung fĂŒr:

-
    -
  • Datenverluste durch Bot-Fehler oder Misconfiguration
  • -
  • Ausfallzeiten oder Performance-Probleme
  • -
  • Direkte, indirekte oder FolgeschĂ€den
  • -
  • Discord API-Änderungen, die Funktionen beeinflussen
  • -
  • Verlust von Server-Daten durch User-Fehler
  • -
-

Der Bot wird "AS IS" (ohne GewÀhrleistung) bereitgestellt.

-
- ), - }, - { - title: "6. FunktionalitĂ€t & Änderungen", - content: ( -
-

Wir behalten uns das Recht vor:

-
    -
  • Funktionen zu aktualisieren, zu optimieren oder zu entfernen
  • -
  • Wartungsarbeiten ohne vorherige AnkĂŒndigung durchzufĂŒhren
  • -
  • Den Bot zeitweise offline zu nehmen
  • -
  • Nutzungsrichtlinien zu Ă€ndern (mit 30 Tagen AnkĂŒndigung)
  • -
-
- ), - }, - { - title: "7. Datenschutz & Datenverwaltung", - content: ( -
-

Siehe unsere DatenschutzerklĂ€rung fĂŒr Details ĂŒber:

-
    -
  • Erhobene und verarbeitete Daten
  • -
  • Dauer der Speicherung
  • -
  • Ihre Rechte nach DSGVO
  • -
  • Kontaktinformationen fĂŒr Datenschutzanfragen
  • -
-
- ), - }, - { - title: "8. Geistiges Eigentum", - content: ( -
-

ManagerX und die Website-Inhalte (außer Open-Source Code) sind urheberrechtlich geschĂŒtzt.

-
    -
  • Logos, Design und UI sind Eigentum von OPPRO.NET
  • -
  • Source Code ist unter GPL-3.0 lizenziert und frei verwendbar
  • -
  • Dokumentation ist unter der Lizenz des Projekts verfĂŒgbar
  • -
-
- ), - }, - { - title: "9. Benutzercommunity & Support", - content: ( -
-

Support wird bereitgestellt ĂŒber:

-
    -
  • GitHub Issues fĂŒr Bug Reports und Feature Requests
  • -
  • E-Mail: support@oppro-network.de
  • -
  • Discord Server (falls vorhanden)
  • -
-

Hinweis: Support ist gemeinschaftlich und kann nicht garantiert werden.

-
- ), - }, - { - title: "10. Beendigung der Nutzung", - content: ( -
-

Wir können Ihren Zugriff beenden, wenn Sie:

-
    -
  • Gegen diese Bedingungen verstoßen
  • -
  • Den Bot zu schĂ€dlichen Zwecken nutzen
  • -
  • Unsere Ressourcen missbrauchen
  • -
-
- ), - }, - { - title: "11. AbhÀngigkeiten & Third-Party", - content: ( -
-

ManagerX nutzt External Libraries und Services:

-
    -
  • discord.py / py-cord: Offizielle Discord API Library
  • -
  • FastAPI & Uvicorn: Python Web Framework
  • -
  • SQLite: Datenbankengine
  • -
  • Dritte Dienste gemĂ€ĂŸ requirements.txt
  • -
-

Siehe requirements/req.txt fĂŒr vollstĂ€ndige Liste.

-
- ), - }, - { - title: "12. Änderungen dieser Bedingungen", - content: ( -
-

Diese Bedingungen können jederzeit geĂ€ndert werden. Bedeutende Änderungen werden mit 30 Tagen AnkĂŒndigung kommuniziert.

-

Letzte Aktualisierung: Januar 2026

-
- ), - }, - { - title: "13. Geltend geltendes Recht", - content: "Diese Bedingungen unterliegen deutschem Recht. Gerichtsstand ist Deutschland.", - }, - { - title: "14. Kontakt bei Fragen", - content: ( -
-

- Rechtliche oder vertragliche Fragen:{" "} - - legal@oppro-network.de - -

-

- Support & Allgemeine Anfragen:{" "} - - support@oppro-network.de - -

-
- ), - }, -]; export const Nutzungsbedingungen = memo(function Nutzungsbedingungen() { + const legalSections = [ + { + title: "1. Geltungsbereich", + icon: Scale, + content: "Diese Nutzungsbedingungen regeln die Verwendung des Discord-Bots ManagerX sowie dieser Website. Mit der Nutzung des Bots, der Website oder des Quellcodes erklÀrst du dich mit diesen Bedingungen einverstanden.", + }, + { + title: "2. Lizenz & Open Source", + icon: Code2, + content: ( +
+

ManagerX wird unter der GNU GPL v3.0 lizenziert.

+
    +
  • Quellcode darf frei eingesehen, modifiziert und verbreitet werden.
  • +
  • Modifikationen mĂŒssen ebenfalls unter GPL-3.0 lizenziert werden.
  • +
  • Kommerzielles Hosting ist gestattet, Quellcode muss verfĂŒgbar sein.
  • +
+
+ ), + }, + { + title: "3. Bot-Nutzung", + icon: Zap, + content: ( +
+

ManagerX darf auf Discord-Servern genutzt werden, sofern:

+
    +
  • ‱ Sie Admin-Rechte auf dem Server haben
  • +
  • ‱ Die Nutzung den Discord Terms of Service entspricht
  • +
  • ‱ Sie keine illegalen oder schĂ€dlichen AktivitĂ€ten durchfĂŒhren
  • +
+
+ ), + }, + { + title: "4. Verbotene Nutzung", + icon: AlertTriangle, + content: ( +
+

Folgende AktivitÀten sind streng untersagt:

+
    +
  • ‱ Reverse Engineering zu böswilligen Zwecken
  • +
  • ‱ DDoS-Attacken oder SicherheitsverstĂ¶ĂŸe
  • +
  • ‱ Automatisierte Spam-Kampagnen
  • +
  • ‱ Verbreitung von Malware oder Exploits
  • +
+

Konsequenz: Sofortiger Ausschluss und Meldung an Behörden.

+
+ ), + }, + { + title: "5. Haftungsausschluss", + icon: Shield, + content: ( +
+

OPPRO.NET Network ĂŒbernimmt keine Haftung fĂŒr:

+
    +
  • Datenverluste
  • +
  • Ausfallzeiten
  • +
  • Indirekte SchĂ€den
  • +
  • User-Fehler
  • +
+

Der Bot wird "AS IS" bereitgestellt.

+
+ ), + }, + { + title: "6. FunktionalitÀt", + icon: RefreshCw, + content: ( +
+

Wir behalten uns das Recht vor, Funktionen jederzeit zu aktualisieren, zu optimieren oder zu entfernen, um die StabilitÀt des Netzwerks zu gewÀhrleisten.

+
+ ), + }, + { + title: "7. Datenschutz", + icon: Lock, + content: ( +

Siehe unsere DatenschutzerklĂ€rung fĂŒr Details ĂŒber erhobene Daten und Ihre Rechte nach DSGVO.

+ ), + }, + { + title: "8. Geistiges Eigentum", + icon: FileText, + content: ( +

ManagerX (Logos, Design, UI) sind Eigentum von OPPRO.NET. Der Quellcode ist unter GPL-3.0 frei verwendbar.

+ ), + }, + { + title: "9. Community & Support", + icon: HelpCircle, + content: ( +
+

Support erfolgt gemeinschaftlich ĂŒber GitHub Issues oder E-Mail. Ein Anspruch auf sofortigen Support besteht nicht.

+
+ ), + }, + { + title: "10. Beendigung", + icon: LogOut, + content: ( +

Wir können Ihren Zugriff beenden, wenn Sie gegen diese Bedingungen verstoßen oder unsere Ressourcen missbrauchen.

+ ), + }, + { + title: "11. AbhÀngigkeiten", + icon: Database, + content: ( +

ManagerX nutzt externe Libraries (discord.py, FastAPI, SQLite). Siehe requirements.txt fĂŒr vollstĂ€ndige Details.

+ ), + }, + { + title: "12. Änderungen", + icon: RefreshCw, + content: ( +

Diese Bedingungen können jederzeit geĂ€ndert werden. Bedeutende Änderungen werden 30 Tage im Voraus angekĂŒndigt.

+ ), + }, + { + title: "13. Geltendes Recht", + icon: Scale, + content: ( +

Diese Bedingungen unterliegen deutschem Recht. Gerichtsstand ist Deutschland.

+ ), + }, + { + title: "14. Kontakt", + icon: Mail, + content: ( +
+

E-Mail: legal@oppro-network.de

+

Letzte Aktualisierung: Januar 2026

+
+ ), + }, + ]; + return ( -
+
- +
-
- {/* ZurĂŒck Button mit dezentem Hover */} -
- + {/* Back Button */} + + - ZurĂŒck zur Startseite + ZurĂŒck zur Zentrale -
+
-
-
- +
+
+
-

- Nutzungsbedingungen +

+ Nutzerregeln

-
- Global v2.0.0 - ‱ - GPL-3.0 +
+ Version 2.0.0 + ‱ + GPL-3.0
@@ -228,50 +181,57 @@ export const Nutzungsbedingungen = memo(function Nutzungsbedingungen() {
{legalSections.map((section, index) => ( - -

- 0{index + 1} - {section.title} -

-

+

+
+ {section.icon && } + {!section.icon && 0{index + 1}} +
+

+ {section.title} +

+
+
{section.content} -

+
))} - {/* Kontakt Bereich - dezent gehalten */} - -
-

Noch Fragen?

-

Kontaktiere das Development-Team.

+
+

Noch Fragen?

+

+ Bei Unklarheiten kontaktiere bitte unser Support-Team oder das Development. +

diff --git a/src/web/pages/PluginsPage.tsx b/src/web/pages/PluginsPage.tsx index d17a0e7..5127d28 100644 --- a/src/web/pages/PluginsPage.tsx +++ b/src/web/pages/PluginsPage.tsx @@ -1,133 +1,185 @@ import { memo } from "react"; import { Link } from "react-router-dom"; -import { - ArrowLeft, Puzzle, Gamepad2, Globe, ShieldCheck, - Users, Zap, Settings2, Code2, Layers, Mail, Github +import { + ArrowLeft, Puzzle, Gamepad2, Globe, ShieldCheck, + Users, Zap, Settings2, Code2, Layers, Mail, Github } from "lucide-react"; import { Navbar } from "../components/Navbar"; import { Footer } from "../components/Footer"; import { motion } from "framer-motion"; + const corePlugins = [ { title: "AI Entertainment", features: ["4-Gewinnt (VS KI)", "TicTacToe (VS KI)"], description: "Intelligente Minispiele direkt im Discord-Chat durch moderne KI-Integration.", icon: Gamepad2, + gradient: "from-primary to-accent", }, { title: "Global Network", features: ["Globalchat", "Server-ĂŒbergreifend"], description: "Verbinde deine Community mit dem gesamten ManagerX-Netzwerk weltweit.", icon: Globe, + gradient: "from-accent to-primary", }, { title: "Security Core", features: ["Antispam", "Moderation", "Warn-System", "Notes"], description: "VollstĂ€ndiger Schutz und Verwaltung fĂŒr dein Team mit intelligenten Filtern.", icon: ShieldCheck, + gradient: "from-primary via-accent to-primary", }, { title: "Social & Engagement", features: ["Levelsystem", "Welcome-Engine", "TempVC"], description: "Steigere die AktivitĂ€t durch Belohnungen und vollautomatische SprachkanĂ€le.", icon: Users, + gradient: "from-accent to-primary", }, { title: "Automation", features: ["Autodelete", "Autorole", "Loggingsystem"], description: "Halte deinen Server sauber und organisiert – alles vollautomatisch im Hintergrund.", icon: Zap, + gradient: "from-primary to-accent", }, { title: "System Control", features: ["Settings", "Stats"], description: "Behalte den vollen Überblick mit detaillierten Analysen und einfacher Konfiguration.", icon: Settings2, + gradient: "from-accent via-primary to-accent", } ]; export const PluginsPage = memo(function PluginsPage() { return ( -
+
- +
- - {/* ZurĂŒck Button */} -
- - ZurĂŒck zur Startseite + ZurĂŒck zur Zentrale -
+ - {/* Header Bereich */} + {/* Header */}
-
-
- -
+
+ + +
+
-

- Built-in Modules -

-
- Version 2.4.0 - ‱ - Native Core -
+ + Built-in Modules + + + Version 2.4.0 + ‱ + Native Core +
-

+ ManagerX ist modular aufgebaut. Die folgenden Kern-Module sind bereits vorinstalliert und können ĂŒber das Dashboard konfiguriert werden. -

+
{/* Core Plugins Grid */}
{corePlugins.map((plugin, index) => ( - -
-
- -
- Module 0{index + 1} + {/* Gradient Border Effect on Hover */} +
+
- -

{plugin.title}

-

- {plugin.description} -

-
- {plugin.features.map(f => ( - - #{f.replace(/\s+/g, '_')} +
+
+ + +
+ + + Module 0{index + 1} - ))} +
+ +

+ {plugin.title} +

+

+ {plugin.description} +

+ +
+ {plugin.features.map(f => ( + + #{f.replace(/\s+/g, '_')} + + ))} +
))}
- {/* External Section - Dezent wie Kontaktbereich */} -
+ {/* External Section */} +

External Marketplace

@@ -135,40 +187,63 @@ export const PluginsPage = memo(function PluginsPage() {
-
+

Developer SDK

Erstelle eigene Python-Module und integriere sie nahtlos in das ManagerX Ökosystem.

-
-
+ +

Community Library

Teile deine Plugins mit der Community oder entdecke Module von anderen Entwicklern.

-
+
-
+ - {/* Kontakt / Support Footer wie in Legal-Seiten */} - -
-

Modul-Wunsch?

-

Kontaktiere uns fĂŒr individuelle Funktions-Ideen.

+
+

Modul-Wunsch?

+

+ Kontaktiere uns fĂŒr individuelle Funktions-Ideen. +

- - - - - - + + + + + +
diff --git a/src/web/pages/Status.tsx b/src/web/pages/Status.tsx index 9787ab6..8a4f704 100644 --- a/src/web/pages/Status.tsx +++ b/src/web/pages/Status.tsx @@ -1,16 +1,16 @@ import { memo, useState, useEffect } from "react"; import { Link } from "react-router-dom"; -import { - ArrowLeft, Activity, Globe, Cpu, Layers, - CheckCircle2, XCircle, Mail, Github +import { + ArrowLeft, Activity, Globe, Cpu, Layers, + CheckCircle2, XCircle, Mail, Github } from "lucide-react"; import { Navbar } from "../components/Navbar"; import { Footer } from "../components/Footer"; import { motion } from "framer-motion"; const Status = memo(function Status() { // State fĂŒr die Live-Daten vom Bot - const [data, setData] = useState({ - status: "loading", + const [data, setData] = useState({ + status: "loading", latency: "--", uptime: "--", guilds: 0, @@ -26,7 +26,7 @@ const Status = memo(function Status() { // Abfrage an die neue FastAPI-Route fĂŒr echte Bot-Daten const response = await fetch("http://localhost:8040/api/v1/managerx/stats"); if (!response.ok) throw new Error("Offline"); - + const result = await response.json(); setData({ status: result.status || "online", @@ -76,20 +76,20 @@ const Status = memo(function Status() { ]; return ( -
- +
- -
- + + + ZurĂŒck zur Zentrale -
+
@@ -127,7 +127,7 @@ const Status = memo(function Status() {
{systems.map((system, index) => ( -
- +
{system.status === "online" ? : }