This commit is contained in:
AntoninoP 2024-07-05 21:49:27 +02:00
parent a3e22b4e20
commit a047d236a3
3 changed files with 32 additions and 22 deletions

View File

@ -88,7 +88,7 @@ const CreateServer = ({ user, onCreateServer }) => {
value={serverVersion} value={serverVersion}
onChange={(e) => setServerVersion(e.target.value)} onChange={(e) => setServerVersion(e.target.value)}
> >
<option value="">Version</option> <option value="1.20.5">Version</option>
<option value="1.20.6">1.20.6</option> <option value="1.20.6">1.20.6</option>
</select> </select>
<button className={styles.btnServCreate} onClick={handleCreateServer}> <button className={styles.btnServCreate} onClick={handleCreateServer}>

View File

@ -72,27 +72,29 @@ const DashboardPage = ({ user }) => {
<Navbar user={user} /> <Navbar user={user} />
{loading ? ( {loading ? (
<Loading /> <Loading />
) : ( ) :
<div className={styles.cardsContainer}> <div className={styles.cardsContainer}>
{servers.length === 0 ? ( <div className={styles.iptitle}>Adresse de connexions à vos serveurs : {subdomain}.servii.fr</div>
<NoServer user={user} onCreateServer={handleCreateServer} /> {servers.length === 0 ? (
) : ( <NoServer user={user} onCreateServer={handleCreateServer} />
servers.map((server, index) => ( ) : (
<ServerCard servers.map((server, index) => (
key={index} <ServerCard
status={server.running} key={index}
version={server.version} status={server.running}
name={server.name} version={server.version}
framework={server.framework} name={server.name}
onRunClick={() => handleRunServer(server.name)} framework={server.framework}
onStopClick={() => handleStopServer(server.name)} onRunClick={() => handleRunServer(server.name)}
onDeleteClick={() => handleDeleteServer(server.name)} onStopClick={() => handleStopServer(server.name)}
subdomain={subdomain} onDeleteClick={() => handleDeleteServer(server.name)}
/> subdomain={subdomain}
)) />
)} )
</div> )
)} )}
</div>
}
</div> </div>
); );
}; };

View File

@ -25,3 +25,11 @@ html, body {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.iptitle{
font-size: 1.5rem;
font-weight: 600;
color: var(--text-color);
font-style: italic;
margin-bottom: 1.5rem;
}