From da72f49255bb6252701bf6235ba40dddf603f1ce Mon Sep 17 00:00:00 2001 From: Pepe44DEV Date: Wed, 1 Jul 2026 15:21:59 +0200 Subject: [PATCH] refactor frontend forms for updated HeroUI inputs --- frontend/src/components/layout/Header.tsx | 4 +- .../src/components/shared/SectionCard.tsx | 8 +-- frontend/src/pages/Automod.tsx | 44 ++++++------ frontend/src/pages/Birthday.tsx | 56 ++++++++------- frontend/src/pages/DynamicVoice.tsx | 48 +++++++------ frontend/src/pages/Events.tsx | 62 +++++++++------- frontend/src/pages/Modules.tsx | 6 +- frontend/src/pages/ReactionRoles.tsx | 36 +++++----- frontend/src/pages/Register.tsx | 37 +++++++--- frontend/src/pages/ServerStats.tsx | 38 +++++----- frontend/src/pages/Settings.tsx | 54 +++++++------- frontend/src/pages/Statuspage.tsx | 40 ++++++----- frontend/src/pages/SupportLogin.tsx | 68 ++++++++++-------- frontend/src/pages/Tickets.tsx | 72 ++++++++++++++----- frontend/src/pages/Welcome.tsx | 62 +++++++++------- 15 files changed, 373 insertions(+), 262 deletions(-) diff --git a/frontend/src/components/layout/Header.tsx b/frontend/src/components/layout/Header.tsx index 8bc13dd..0632ad9 100644 --- a/frontend/src/components/layout/Header.tsx +++ b/frontend/src/components/layout/Header.tsx @@ -79,10 +79,10 @@ export function Header() { } function useHeaderData() { - const { guildInfo, guilds, currentGuildId } = useApp(); + const { guildInfo, guilds, currentGuildId, statusMessage } = useApp(); const selectedGuild = guilds.find((g) => g.id === currentGuildId); return { guildName: guildInfo?.name || selectedGuild?.name || 'Dashboard', - statusMessage: null, + statusMessage, }; } diff --git a/frontend/src/components/shared/SectionCard.tsx b/frontend/src/components/shared/SectionCard.tsx index 4c7a44c..b02b690 100644 --- a/frontend/src/components/shared/SectionCard.tsx +++ b/frontend/src/components/shared/SectionCard.tsx @@ -1,4 +1,4 @@ -import { Card, CardHeader, CardContent } from '@heroui/react'; +import { Card, CardHeader, CardContent, CardTitle, CardDescription } from '@heroui/react'; import type { ReactNode } from 'react'; type Props = { @@ -12,9 +12,9 @@ export function SectionCard({ title, subtitle, children, action }: Props) { return ( -
-

{title}

- {subtitle &&

{subtitle}

} +
+ {title} + {subtitle && {subtitle}}
{action &&
{action}
} diff --git a/frontend/src/pages/Automod.tsx b/frontend/src/pages/Automod.tsx index 35f5510..ccbfa07 100644 --- a/frontend/src/pages/Automod.tsx +++ b/frontend/src/pages/Automod.tsx @@ -1,4 +1,4 @@ -import { Card, CardContent, CardHeader, Input, TextArea, Button, Chip, Switch, Separator } from '@heroui/react'; +import { Card, CardContent, CardHeader, Input, TextArea, Button, Chip, Switch, Separator, TextField, Label } from '@heroui/react'; import { Shield, Filter, Link, Ban, AlertTriangle, Save } from 'lucide-react'; import { useApp } from '../context/AppContext'; import { SectionCard } from '../components/shared/SectionCard'; @@ -14,37 +14,41 @@ export function Automod() {

Filter konfigurieren

- setSettings((s) => ({ ...s, automodEnabled: v }))}> + setSettings((s) => ({ ...s, automodEnabled: v }))}>
Automod aktiv
- setSettings((s) => ({ ...s, automodConfig: { ...(s.automodConfig || {}), badWordFilter: v } }))}> + setSettings((s) => ({ ...s, automodConfig: { ...(s.automodConfig || {}), badWordFilter: v } }))}>
Bad-Word-Filter
- setSettings((s) => ({ ...s, automodConfig: { ...(s.automodConfig || {}), linkFilter: v } }))}> + setSettings((s) => ({ ...s, automodConfig: { ...(s.automodConfig || {}), linkFilter: v } }))}>
Link-Filter
- setSettings((s) => ({ ...s, automodConfig: { ...(s.automodConfig || {}), spamFilter: v } }))}> + setSettings((s) => ({ ...s, automodConfig: { ...(s.automodConfig || {}), spamFilter: v } }))}>
Spam-Filter
- setSettings((s) => ({ ...s, automodConfig: { ...(s.automodConfig || {}), logChannelId: v } }))} - /> + + + setSettings((s) => ({ ...s, automodConfig: { ...(s.automodConfig || {}), logChannelId: e.target.value } }))} + /> + -