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

@@ -0,0 +1,46 @@
'use client';
import { useSteamCMD } from '@/lib/context/SteamCMDContext';
export function SteamCMDNotification() {
const { isSteamCMDRunning, runningSteamServers } = useSteamCMD();
if (!isSteamCMDRunning) {
return null;
}
const serverCount = runningSteamServers.size;
return (
<div className="bg-yellow-600 border-l-4 border-yellow-400 p-4">
<div className="flex items-center">
<div className="flex-shrink-0">
<svg
className="h-5 w-5 text-yellow-50"
viewBox="0 0 20 20"
fill="currentColor"
>
<path
fillRule="evenodd"
d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z"
clipRule="evenodd"
/>
</svg>
</div>
<div className="ml-3">
<p className="text-sm text-yellow-50">
<strong>SteamCMD is currently running</strong> for {serverCount} server{serverCount !== 1 ? 's' : ''}.
Server actions are temporarily disabled to prevent conflicts.
This will automatically resolve when the download completes.
</p>
</div>
<div className="ml-auto flex-shrink-0">
<div className="flex items-center">
<div className="animate-spin h-4 w-4 border-2 border-yellow-50 border-t-transparent rounded-full mr-2"></div>
<span className="text-xs text-yellow-50">Downloading...</span>
</div>
</div>
</div>
</div>
);
}