Condense la page utilisateur

This commit is contained in:
2026-04-15 22:44:22 +02:00
parent b2cbab7891
commit 9aae4cadc0
2 changed files with 151 additions and 58 deletions

View File

@@ -103,81 +103,56 @@
}
else if (Profile is not null)
{
<section class="panel panel-half">
<div class="section-heading">
<section class="panel panel-wide user-profile-panel">
<div class="section-heading user-profile-heading">
<div>
<p class="eyebrow">Compte relie</p>
<p class="eyebrow">Profil joueur</p>
<h2>@Profile.DisplayName</h2>
</div>
<p class="section-copy">
Le compte connecte pilote l'identite, et cette page ajoute les donnees metier du site.
</p>
<div class="user-profile-chips">
<span class="mini-chip admin-chip-outline">@Profile.Username</span>
@if (!string.IsNullOrWhiteSpace(Profile.Email))
{
<span class="mini-chip admin-chip-neutral">@Profile.Email</span>
}
</div>
</div>
<div class="profile-meta-grid">
<article class="profile-meta-card">
<span class="micro-label">Username</span>
<strong>@Profile.Username</strong>
</article>
<article class="profile-meta-card">
<span class="micro-label">Email</span>
<strong>@(Profile.Email ?? "Non renseigne")</strong>
</article>
<article class="profile-meta-card">
<span class="micro-label">Cree le</span>
<p class="user-profile-note">Compte Keycloak relie a une fiche site compacte stockee en MySQL.</p>
<div class="user-profile-summary-grid">
<article class="user-summary-card">
<span class="micro-label">Cree</span>
<strong>@FormatDate(Profile.CreatedUtc)</strong>
</article>
<article class="profile-meta-card">
<article class="user-summary-card">
<span class="micro-label">Mis a jour</span>
<strong>@FormatDate(Profile.UpdatedUtc)</strong>
</article>
</div>
</section>
<section class="panel panel-half">
<div class="section-heading">
<div>
<p class="eyebrow">Resume du profil</p>
<h2>Informations visibles pour le site</h2>
</div>
</div>
<div class="home-mini-grid two-columns profile-highlights">
<article class="mini-panel">
<article class="user-summary-card">
<span class="micro-label">Club</span>
<strong>@(Profile.Club ?? "A definir")</strong>
</article>
<article class="mini-panel">
<article class="user-summary-card">
<span class="micro-label">Ville</span>
<strong>@(Profile.City ?? "A definir")</strong>
</article>
<article class="mini-panel">
<span class="micro-label">Format prefere</span>
<article class="user-summary-card">
<span class="micro-label">Format</span>
<strong>@(Profile.PreferredFormat ?? "A definir")</strong>
</article>
<article class="mini-panel">
<article class="user-summary-card">
<span class="micro-label">Cube favori</span>
<strong>@(Profile.FavoriteCube ?? "A definir")</strong>
</article>
</div>
<div class="callout profile-callout">
<div class="callout user-profile-bio">
<span class="micro-label">Bio</span>
<p>@(Profile.Bio ?? "Aucune bio enregistree pour le moment.")</p>
</div>
</section>
<section class="panel panel-wide">
<div class="section-heading">
<div>
<p class="eyebrow">Edition</p>
<h2>Mettre a jour le profil du site</h2>
</div>
<p class="section-copy">
Les champs ci-dessous sont stockes dans MySQL et pourront ensuite
servir a enrichir les pages, les inscriptions ou les statistiques.
</p>
</div>
@if (!string.IsNullOrWhiteSpace(SaveError))
{
@@ -192,8 +167,8 @@
<EditForm Model="@Form" OnValidSubmit="SaveProfileAsync">
<DataAnnotationsValidator />
<div class="profile-form-grid">
<label class="field">
<div class="profile-form-grid user-profile-form-grid">
<label class="field user-span-2">
<span>Nom affiche</span>
<InputText @bind-Value="Form.DisplayName" />
<ValidationMessage For="@(() => Form.DisplayName)" />
@@ -222,24 +197,23 @@
<ValidationMessage For="@(() => Form.PreferredFormat)" />
</label>
<label class="field span-2">
<label class="field user-span-2">
<span>Cube favori</span>
<InputText @bind-Value="Form.FavoriteCube" />
<ValidationMessage For="@(() => Form.FavoriteCube)" />
</label>
<label class="field span-2">
<label class="field user-span-full">
<span>Bio</span>
<InputTextArea @bind-Value="Form.Bio" />
<InputTextArea @bind-Value="Form.Bio" rows="2" />
<ValidationMessage For="@(() => Form.Bio)" />
</label>
</div>
<div class="profile-actions">
<button class="button secondary" type="submit" disabled="@IsSaving">
@(IsSaving ? "Enregistrement..." : "Enregistrer le profil")
<div class="profile-actions user-profile-actions">
<button class="button secondary small" type="submit" disabled="@IsSaving">
@(IsSaving ? "Enregistrement..." : "Enregistrer")
</button>
<p class="section-copy">Les champs vides restent facultatifs et peuvent etre completes plus tard.</p>
</div>
</EditForm>
</section>