- {servers.map((server) => (
-
- ))}
+ {/* Responsive server list */}
+
+ {/* Card grid — desktop only */}
+
+ {servers.map((server) => (
+
+ ))}
+
+ {/* Row list — mobile only */}
+
+ {servers.map((server) => (
+
+ ))}
+
diff --git a/src/components/server/ServerRow.tsx b/src/components/server/ServerRow.tsx
new file mode 100644
index 0000000..800fe18
--- /dev/null
+++ b/src/components/server/ServerRow.tsx
@@ -0,0 +1,86 @@
+'use client';
+
+import { useTransition } from 'react';
+import { useRouter } from 'next/navigation';
+import Link from 'next/link';
+import { Server, ServiceStatus } from '@/lib/schemas';
+import {
+ startServerEventAction,
+ restartServerEventAction,
+ stopServerEventAction
+} from '@/lib/actions/servers';
+import { StatusDot } from '@/components/ui/StatusDot';
+import { GhButton } from '@/components/ui/GhButton';
+
+interface ServerRowProps {
+ server: Server;
+}
+
+export function ServerRow({ server }: ServerRowProps) {
+ const [isPending, startTransition] = useTransition();
+ const router = useRouter();
+
+ const startServer = () =>
+ startTransition(async () => {
+ await startServerEventAction(server.id);
+ router.refresh();
+ });
+ const restartServer = () =>
+ startTransition(async () => {
+ await restartServerEventAction(server.id);
+ router.refresh();
+ });
+ const stopServer = () =>
+ startTransition(async () => {
+ await stopServerEventAction(server.id);
+ router.refresh();
+ });
+
+ const transitioning = [
+ ServiceStatus.Restarting,
+ ServiceStatus.Starting,
+ ServiceStatus.Stopping,
+ ServiceStatus.Unknown,
+ ].includes(server.status);
+ const disabled = transitioning || isPending;
+
+ return (
+
+
+
+
+
{server.name}
+
+ {server.state?.track ?? 'No track'} · {server.state?.playerCount ?? 0} players
+
+
+
+
+ {server.status === ServiceStatus.Stopped ? (
+
+ Start
+
+ ) : (
+ <>
+
+ Restart
+
+
+ Stop
+
+ >
+ )}
+
+
+ );
+}
diff --git a/src/components/ui/SteamCMDNotification.tsx b/src/components/ui/SteamCMDNotification.tsx
index 1dfddc4..8739055 100755
--- a/src/components/ui/SteamCMDNotification.tsx
+++ b/src/components/ui/SteamCMDNotification.tsx
@@ -12,11 +12,11 @@ export function SteamCMDNotification() {
const serverCount = runningSteamServers.size;
return (
-
+
@@ -28,7 +28,7 @@ export function SteamCMDNotification() {
-
+
SteamCMD is currently running for {serverCount} server{serverCount !== 1 ? 's' : ''}.
Server actions are temporarily disabled to prevent conflicts.
This will automatically resolve when the download completes.
@@ -36,8 +36,8 @@ export function SteamCMDNotification() {
-
-
Downloading...
+
+
Downloading...