fix styles

This commit is contained in:
AntoninoP 2024-07-05 23:11:21 +02:00
parent a047d236a3
commit 0eb0b0c2ff
3 changed files with 15 additions and 8 deletions

View File

@ -17,8 +17,8 @@
} }
.frameworkIcon { .frameworkIcon {
width: 27px; width: 2rem;
height: 27px; height: 2rem;
pointer-events: none; pointer-events: none;
} }
@ -30,7 +30,7 @@
border-radius: 0.6rem; border-radius: 0.6rem;
outline: none; outline: none;
cursor: pointer; cursor: pointer;
transition: background-color 0.3s ease; /* Smooth transition for color change */ transition: background-color 0.3s ease;
} }
.runningButton{ .runningButton{
background-color: #8d213e; background-color: #8d213e;
@ -40,7 +40,7 @@
border-radius: 0.6rem; border-radius: 0.6rem;
outline: none; outline: none;
cursor: pointer; cursor: pointer;
transition: background-color 0.3s ease; /* Smooth transition for color change */ transition: background-color 0.3s ease;
} }
.deleteButton{ .deleteButton{
width: 20px; width: 20px;

View File

@ -16,7 +16,10 @@ const DashboardPage = ({ user }) => {
try { try {
const ApiResponse = await serviiApi.fetchServers(); const ApiResponse = await serviiApi.fetchServers();
const data = ApiResponse.message; const data = ApiResponse.message;
setServers(data);
const sortedServers = data.sort((a, b) => b.running - a.running);
setServers(sortedServers);
const userSubdomain = await getUserSubdomain(user.uid); const userSubdomain = await getUserSubdomain(user.uid);
setSubdomain(userSubdomain); setSubdomain(userSubdomain);
} catch (error) { } catch (error) {
@ -74,8 +77,8 @@ const DashboardPage = ({ user }) => {
<Loading /> <Loading />
) : ) :
<div className={styles.cardsContainer}> <div className={styles.cardsContainer}>
<div className={styles.iptitle}>Adresse de connexions à vos serveurs : {subdomain}.servii.fr</div> <div className={styles.iptitle}>Adresse de connexions à vos serveurs : <span>{subdomain}.servii.fr</span></div>
{servers.length === 0 ? ( {servers.length === 0 ? (
<NoServer user={user} onCreateServer={handleCreateServer} /> <NoServer user={user} onCreateServer={handleCreateServer} />
) : ( ) : (
servers.map((server, index) => ( servers.map((server, index) => (

View File

@ -17,7 +17,7 @@ html, body {
} }
.cardsContainer { .cardsContainer {
width: 100%; width: 50rem;
margin-top: 5rem; margin-top: 5rem;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -32,4 +32,8 @@ html, body {
color: var(--text-color); color: var(--text-color);
font-style: italic; font-style: italic;
margin-bottom: 1.5rem; margin-bottom: 1.5rem;
}
.iptitle span {
color: violet;
} }