server creation

This commit is contained in:
Fran Jurmanović
2025-09-18 01:34:16 +02:00
parent b7999b02e8
commit b0ee67c2be
21 changed files with 1542 additions and 82 deletions

View File

@@ -5,6 +5,9 @@ import { ServerCard } from '@/components/server/ServerCard';
import { logoutAction } from '@/lib/actions/auth';
import RefreshButton from '@/components/ui/RefreshButton';
import Link from 'next/link';
import { ServerListWithActions } from '@/components/server/ServerListWithActions';
import { WebSocketInitializer } from '@/components/websocket/WebSocketInitializer';
import { SteamCMDNotification } from '@/components/ui/SteamCMDNotification';
export default async function DashboardPage() {
const session = await requireAuth();
@@ -12,6 +15,7 @@ export default async function DashboardPage() {
return (
<div className="min-h-screen bg-gray-900 text-white">
<WebSocketInitializer openToken={session.openToken} />
<header className="bg-gray-800 shadow-md">
<div className="mx-auto flex max-w-[120rem] items-center justify-between px-4 py-4 sm:px-6 lg:px-8">
<h1 className="text-2xl font-bold">ACC Server Manager</h1>
@@ -61,17 +65,10 @@ export default async function DashboardPage() {
</div>
</header>
<main className="mx-auto max-w-[120rem] px-4 py-8 sm:px-6 lg:px-8">
<div className="mb-6 flex items-center justify-between">
<h2 className="text-xl font-semibold">Your Servers</h2>
<RefreshButton />
</div>
<SteamCMDNotification />
<div className="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
{servers.map((server) => (
<ServerCard key={server.id} server={server} />
))}
</div>
<main className="mx-auto max-w-[120rem] px-4 py-8 sm:px-6 lg:px-8">
<ServerListWithActions servers={servers} user={session.user!} />
</main>
</div>
);