+ {/* Header */}
+
+
+ 🔧
+
{serverName}
+
+
+
+ {/* Connection Status */}
+
+ {getConnectionStatusIcon()}
+ {(connectionStatus === 'disconnected' || connectionStatus === 'error') && (
+
+ 🔄
+
+ )}
+
+
+ {/* Console Toggle */}
+
setIsConsoleVisible(!isConsoleVisible)}
+ className="text-sm text-gray-400 hover:text-white"
+ title={isConsoleVisible ? 'Hide Console' : 'Show Console'}
+ >
+ {isConsoleVisible ? '📋' : '📋'}
+
+
+ {/* Minimize */}
+
setIsMinimized(true)}
+ className="text-gray-400 hover:text-white"
+ title="Minimize"
+ >
+
+
+
+
+
+ {/* Close */}
+ {isCompleted && (
+
+
+
+
+
+ )}
+
+
+
+ {/* Connection Error Banner */}
+ {(connectionStatus === 'disconnected' || connectionStatus === 'error') && (
+
+
+ Connection lost - {connectionError || 'Reconnecting...'}
+
+ Reconnect
+
+
+
+ )}
+
+ {/* Steps Progress */}
+
+
+ {STEPS.map(({ key, label }) => {
+ const stepStatus = steps[key];
+ return (
+
+ {getStepStatusIcon(stepStatus?.status || 'pending')}
+ {label}
+
+ );
+ })}
+
+
+
+ {/* Console Output */}
+ {isConsoleVisible && (
+
+
+ {entries.map((entry) => (
+
+
+ {new Date(entry.timestamp * 1000).toLocaleTimeString()}
+ {' '}
+ {entry.content}
+
+ ))}
+ {entries.length === 0 && (
+
+ Waiting for server creation to begin...
+
+ )}
+
+
+ )}
+
+ {/* Completion Status */}
+ {isCompleted && (
+
+ {completionResult?.message}
+
+ )}
+
+ );
+}
diff --git a/src/components/server/ServerCreationPopupContainer.tsx b/src/components/server/ServerCreationPopupContainer.tsx
new file mode 100644
index 0000000..0ea26fb
--- /dev/null
+++ b/src/components/server/ServerCreationPopupContainer.tsx
@@ -0,0 +1,29 @@
+'use client';
+
+import { useServerCreationPopup } from '@/lib/context/ServerCreationPopupContext';
+import { ServerCreationPopup } from './ServerCreationPopup';
+
+export function ServerCreationPopupContainer() {
+ const { popup, hidePopup } = useServerCreationPopup();
+
+ if (!popup) return null;
+
+ const handleComplete = (success: boolean, message: string) => {
+ // Refresh the page on successful completion to show the new server
+ if (success) {
+ setTimeout(() => {
+ window.location.reload();
+ }, 2000); // Wait 2 seconds to let user see the success message
+ }
+ };
+
+ return (
+
+
Your Servers
+
+ {canCreateServer && (
+ setIsCreateModalOpen(true)}
+ disabled={isSteamCMDRunning}
+ className="rounded-md bg-green-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-green-700 disabled:cursor-not-allowed disabled:opacity-50"
+ title={isSteamCMDRunning ? 'Server creation disabled while SteamCMD is running' : ''}
+ >
+ Create Server
+
+ )}
+
+
+
+
+