diff --git a/docker-compose.yml b/docker-compose.yml index 45218cd..e9f5cd0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,7 +9,7 @@ services: working_dir: /usr/src/app env_file: - .env - command: sh -c "npm run dev" + command: sh -c "npx prisma migrate deploy --schema=src/database/schema.prisma && npm run dev" ports: - "3000:3000" depends_on: diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index d5573bf..6adccad 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,3 +1,4 @@ +import { useEffect } from 'react'; import { useApp } from './context/AppContext'; import { AppLayout } from './components/layout/AppLayout'; import { GuildSelect } from './pages/GuildSelect'; @@ -17,10 +18,27 @@ import { SettingsPage } from './pages/Settings'; import { ModulesPage } from './pages/Modules'; import { Events } from './pages/Events'; import { Tasks } from './pages/Tasks'; +import { Watchlist } from './pages/Watchlist'; import { Admin } from './pages/Admin'; +import { Branding } from './pages/Branding'; +import { Growth } from './pages/Growth'; + +const THEME_COLORS: Record = { + orange: '#f97316', + blue: '#3b82f6', + green: '#22c55e', + purple: '#a855f7', + red: '#ef4444' +}; function AppContent() { - const { guilds, currentGuildId, section } = useApp(); + const { guilds, currentGuildId, section, settings } = useApp(); + + useEffect(() => { + const branding = settings.brandingConfig || {}; + const color = branding.embedColor || (branding.theme ? THEME_COLORS[branding.theme] : undefined); + if (color) document.documentElement.style.setProperty('--accent', color); + }, [settings.brandingConfig]); if (!guilds.length) { return ; @@ -47,6 +65,9 @@ function AppContent() { case 'modules': return ; case 'events': return ; case 'tasks': return ; + case 'watchlist': return ; + case 'branding': return ; + case 'growth': return ; case 'admin': return ; default: return ; } diff --git a/frontend/src/components/layout/Sidebar.tsx b/frontend/src/components/layout/Sidebar.tsx index 0e33464..42a375b 100644 --- a/frontend/src/components/layout/Sidebar.tsx +++ b/frontend/src/components/layout/Sidebar.tsx @@ -5,8 +5,8 @@ import { } from '@heroui/react'; import { LogOut, PanelLeftClose, PanelLeft, Activity, AudioLines, CalendarDays, - ClipboardList, Home, LogIn, ListChecks, Music, Puzzle, RadioTower, Settings, - Shield, Sparkles, Tag, Ticket, Wrench + ClipboardList, Eye, Home, LogIn, ListChecks, Music, Palette, Puzzle, RadioTower, Settings, + Shield, Sparkles, Tag, Ticket, TrendingUp, Wrench } from 'lucide-react'; import { useApp } from '../../context/AppContext'; import { AppAvatar } from '../shared/AppAvatar'; @@ -40,6 +40,7 @@ const navGroups = [ { key: 'automod', label: 'Automod', icon: }, { key: 'reactionroles', label: 'Reaction Roles', icon: }, { key: 'tasks', label: 'Team-Aufgaben', icon: }, + { key: 'watchlist', label: 'Watchlist', icon: }, ] }, { @@ -49,29 +50,39 @@ const navGroups = [ { key: 'music', label: 'Musik', icon: }, { key: 'statuspage', label: 'Statuspage', icon: }, { key: 'serverstats', label: 'Server Stats', icon: }, + { key: 'growth', label: 'Wachstum', icon: }, ] }, { label: 'System', items: [ { key: 'modules', label: 'Module', icon: }, + { key: 'branding', label: 'Branding', icon: }, { key: 'settings', label: 'Einstellungen', icon: }, ] } ]; export function Sidebar() { - const { user, guilds, currentGuildId, section, setCurrentGuildId, setSection, handleLogout } = useApp(); + const { user, guilds, currentGuildId, section, setCurrentGuildId, setSection, handleLogout, settings } = useApp(); const [collapsed, setCollapsed] = useState(false); + const branding = settings.brandingConfig || {}; + const botName = branding.botName || 'Papo'; return (