diff --git a/VeraxShield/VeraxShield/App.razor b/VeraxShield/VeraxShield/App.razor index 48e4e6f..225e0c2 100644 --- a/VeraxShield/VeraxShield/App.razor +++ b/VeraxShield/VeraxShield/App.razor @@ -4,9 +4,8 @@ - -

Sorry, there's nothing at this address.

-
+ +
diff --git a/VeraxShield/VeraxShield/composants/affichages/navBar/NavBarPrincipale.razor b/VeraxShield/VeraxShield/composants/affichages/navBar/NavBarPrincipale.razor index 2367fed..86f4136 100644 --- a/VeraxShield/VeraxShield/composants/affichages/navBar/NavBarPrincipale.razor +++ b/VeraxShield/VeraxShield/composants/affichages/navBar/NavBarPrincipale.razor @@ -22,7 +22,7 @@ - @DonneurEtat.NomUtilisateur + @DonneurEtat.getUtilisateurCourant().Pseudo diff --git a/VeraxShield/VeraxShield/composants/affichages/utilisateurs/DatagridUtilisateurs.razor b/VeraxShield/VeraxShield/composants/affichages/utilisateurs/DatagridUtilisateurs.razor index 5365a55..2d84050 100644 --- a/VeraxShield/VeraxShield/composants/affichages/utilisateurs/DatagridUtilisateurs.razor +++ b/VeraxShield/VeraxShield/composants/affichages/utilisateurs/DatagridUtilisateurs.razor @@ -6,6 +6,10 @@ @layout NavBarPrincipale + + + + - + + + + + @if (context.IsBan) + { + Ban + } else + { + Valide + } + + + + + + - - + + + - - - + @context.PageNumber - - - - - @context.TotalItems total items - @context.TotalItems - + + + + + @context.TotalItems utilisateurs + @context.TotalItems + + + + @@ -62,7 +84,7 @@ - @foreach (var curPageSize in context.PageSizes) { @curPageSize @@ -71,12 +93,6 @@ -
- - Ajouter - -
-
Pseudo - + @@ -43,8 +43,13 @@
- - + + +
diff --git a/VeraxShield/VeraxShield/composants/authentification/FormulaireConnexion.razor.cs b/VeraxShield/VeraxShield/composants/authentification/FormulaireConnexion.razor.cs index 9f16970..cc8805b 100644 --- a/VeraxShield/VeraxShield/composants/authentification/FormulaireConnexion.razor.cs +++ b/VeraxShield/VeraxShield/composants/authentification/FormulaireConnexion.razor.cs @@ -23,6 +23,7 @@ namespace VeraxShield.composants.authentification protected override async Task OnInitializedAsync() { this.Requete = new RequeteConnexion(); + await base.OnInitializedAsync(); } public async Task OnSubmit() @@ -40,5 +41,10 @@ namespace VeraxShield.composants.authentification } } } + + public async Task RedirectionInscription() + { + this.NavigationManager.NavigateTo("/inscription"); + } } } \ No newline at end of file diff --git a/VeraxShield/VeraxShield/composants/authentification/FormulaireInscription.razor b/VeraxShield/VeraxShield/composants/authentification/FormulaireInscription.razor new file mode 100644 index 0000000..744d900 --- /dev/null +++ b/VeraxShield/VeraxShield/composants/authentification/FormulaireInscription.razor @@ -0,0 +1,119 @@ +@using Blazorise.Components; +@using System.ComponentModel.DataAnnotations; + + + + + +
+ +

S'inscrire

+ + + + +
+ + + Pseudo + + + + + + + + + +
+ +
+ + + Prenom + + + + + + + + + +
+ +
+ + + Nom + + + + + + + + + +
+ +
+ + + Mail + + + + + + + + + +
+ +
+ + + Mot de passe + + + + + + + + + +
+ +
+ + + Confirmer le mot de passe + + + + + + + + + +
+ +
+ + +
+ + + + +
+ +
\ No newline at end of file diff --git a/VeraxShield/VeraxShield/composants/authentification/FormulaireInscription.razor.cs b/VeraxShield/VeraxShield/composants/authentification/FormulaireInscription.razor.cs new file mode 100644 index 0000000..61bfe4d --- /dev/null +++ b/VeraxShield/VeraxShield/composants/authentification/FormulaireInscription.razor.cs @@ -0,0 +1,43 @@ +using Blazorise; +using Microsoft.AspNetCore.Components; +using VeraxShield.composants.formulaires.modeles; + +namespace VeraxShield.composants.authentification +{ + public partial class FormulaireInscription + { + + [Parameter] + public Validations Validations {get; set;} + + public RequeteInscription Requete {get; set;} + + [Inject] + private NavigationManager NavigationManager {get; set;} + + [Inject] + private DonneurEtat DonneurEtat {get; set;} + + public String Erreur {get; set; } + + protected override async Task OnInitializedAsync() + { + this.Requete = new RequeteInscription(); + await base.OnInitializedAsync(); + } + + public async Task OnSubmit() + { + if (await this.Validations.ValidateAll()) + { + await DonneurEtat.Inscription(this.Requete); + NavigationManager.NavigateTo("/connexion"); + } + } + + public async Task OnAnnulation() + { + this.NavigationManager.NavigateTo("/connexion"); + } + } +} \ No newline at end of file diff --git a/VeraxShield/VeraxShield/composants/authentification/modele/RequeteConnexion.cs b/VeraxShield/VeraxShield/composants/authentification/modele/RequeteConnexion.cs index ee522ca..47a7c8a 100644 --- a/VeraxShield/VeraxShield/composants/authentification/modele/RequeteConnexion.cs +++ b/VeraxShield/VeraxShield/composants/authentification/modele/RequeteConnexion.cs @@ -8,6 +8,6 @@ namespace VeraxShield.composants.formulaires.modeles public string MotDePasse { get; set; } [Required(ErrorMessage="le champ est obligatoire !")] - public string Nom { get; set; } + public string Pseudo { get; set; } } } diff --git a/VeraxShield/VeraxShield/composants/authentification/modele/RequeteInscription.cs b/VeraxShield/VeraxShield/composants/authentification/modele/RequeteInscription.cs index 0a80f0d..9d99d90 100644 --- a/VeraxShield/VeraxShield/composants/authentification/modele/RequeteInscription.cs +++ b/VeraxShield/VeraxShield/composants/authentification/modele/RequeteInscription.cs @@ -13,5 +13,14 @@ namespace VeraxShield.composants.formulaires.modeles [Required] public string Nom { get; set; } + + [Required] + public string Prenom {get; set;} + + [Required] + public string Pseudo { get; set; } + + [Required] + public string Mail { get; set;} } } diff --git a/VeraxShield/VeraxShield/factories/UtilisateursFactory.cs b/VeraxShield/VeraxShield/factories/UtilisateursFactory.cs index dc5b781..34c2cc2 100644 --- a/VeraxShield/VeraxShield/factories/UtilisateursFactory.cs +++ b/VeraxShield/VeraxShield/factories/UtilisateursFactory.cs @@ -32,5 +32,16 @@ namespace VeraxShield.factories return temp; } + + // public static Utilisateur toUtilisateur(UtilisateurCourant appUtilisateur) + // { + // return new Utilisateur(appUtilisateur.Pseudo, appUtilisateur.Nom, appUtilisateur.Prenom, + // appUtilisateur.Roles[0], appUtilisateur.MotDePasse, appUtilisateur.Mail, false); + // } + + public static AppUtilisateur toAppUtilisateur(Utilisateur u) + { + return new AppUtilisateur(u.Pseudo, u.Nom, u.Prenom, u.Mail, u.Mdp, u.Role); + } } } diff --git a/VeraxShield/VeraxShield/modele/authentification/AppUtilisateur.cs b/VeraxShield/VeraxShield/modele/authentification/AppUtilisateur.cs index 4da82d2..662f348 100644 --- a/VeraxShield/VeraxShield/modele/authentification/AppUtilisateur.cs +++ b/VeraxShield/VeraxShield/modele/authentification/AppUtilisateur.cs @@ -2,11 +2,18 @@ public class AppUtilisateur { public string MotDePasse { get; set; } public List Roles { get; set; } + public string Pseudo { get; set; } + public string Prenom { get; set; } public string Nom { get; set; } + public string Mail { get; set; } - public AppUtilisateur(string nom, string mdp, String premierRole) + + public AppUtilisateur(string pseudo,string nom, string prenom, string mail, string mdp, String premierRole) { this.MotDePasse = mdp; + this.Pseudo = pseudo; + this.Mail = mail; + this.Prenom = prenom; this.Nom = nom; this.Roles = new List(); diff --git a/VeraxShield/VeraxShield/modele/authentification/UtilisateurCourant.cs b/VeraxShield/VeraxShield/modele/authentification/UtilisateurCourant.cs index 9cb4e08..5a1dd43 100644 --- a/VeraxShield/VeraxShield/modele/authentification/UtilisateurCourant.cs +++ b/VeraxShield/VeraxShield/modele/authentification/UtilisateurCourant.cs @@ -2,5 +2,5 @@ public class UtilisateurCourant { public Dictionary Claims { get; set; } public bool EstAuthentifie { get; set; } - public string Nom { get; set; } + public string Pseudo { get; set; } } \ No newline at end of file diff --git a/VeraxShield/VeraxShield/pages/Index.razor b/VeraxShield/VeraxShield/pages/Index.razor index 8cd2665..eeefd6b 100644 --- a/VeraxShield/VeraxShield/pages/Index.razor +++ b/VeraxShield/VeraxShield/pages/Index.razor @@ -1,5 +1,7 @@ -@page "/" +@using VeraxShield.composants.affichages.navBar; +@page "/" + Liste des utilisateurs + -> Liste des utilisateurs + +--> + + + + + + + + +
+

VeraxShield

+
+ +
+
+
+ +
+
+ +
+
+
+
+ . +
+ +
+ + + + +
+

VeraxShield

+
+ + + @layout NavBarPrincipale + +
+
+

Adiu : @context.User.Identity.Name!

+

Podètz veire aquest contengut solament se sètz autentificat !

+
+
+ +
+ +
\ No newline at end of file diff --git a/VeraxShield/VeraxShield/pages/Index.razor.cs b/VeraxShield/VeraxShield/pages/Index.razor.cs index dcc252a..b6fe570 100644 --- a/VeraxShield/VeraxShield/pages/Index.razor.cs +++ b/VeraxShield/VeraxShield/pages/Index.razor.cs @@ -20,9 +20,9 @@ namespace VeraxShield.pages NavigationManager.NavigateTo("/connexion"); } - private async Task NavBar() + private void RetourVerax() { - NavigationManager.NavigateTo("/NavBar"); + NavigationManager.NavigateTo("https://www.verax.com"); } } } \ No newline at end of file diff --git a/VeraxShield/VeraxShield/pages/authentification/Inscription.razor b/VeraxShield/VeraxShield/pages/authentification/Inscription.razor new file mode 100644 index 0000000..f975387 --- /dev/null +++ b/VeraxShield/VeraxShield/pages/authentification/Inscription.razor @@ -0,0 +1,14 @@ +@using VeraxShield.composants.authentification; + +@page "/inscription" + + + + + +
+ +
+ +
+
\ No newline at end of file diff --git a/VeraxShield/VeraxShield/pages/erreurs/ErreurParDefaut.razor b/VeraxShield/VeraxShield/pages/erreurs/ErreurParDefaut.razor new file mode 100644 index 0000000..35207d7 --- /dev/null +++ b/VeraxShield/VeraxShield/pages/erreurs/ErreurParDefaut.razor @@ -0,0 +1,17 @@ + + + + +
+
+ + 500 + + + Error intern dau servidor. + + + Aquesta pagina existís pas + +
+
\ No newline at end of file diff --git a/VeraxShield/VeraxShield/pages/utilisateurs/ListeUtilisateurs.razor b/VeraxShield/VeraxShield/pages/utilisateurs/ListeUtilisateurs.razor index 060d0f7..5806529 100644 --- a/VeraxShield/VeraxShield/pages/utilisateurs/ListeUtilisateurs.razor +++ b/VeraxShield/VeraxShield/pages/utilisateurs/ListeUtilisateurs.razor @@ -4,9 +4,22 @@ @page "/utilisateurs/liste" @attribute [Authorize(Roles = "admin, modo")] -

Utilisateurs de Verax

+ + + + + +
+

Utilisateurs de Verax

+

Vous retrouverez ici les utilisateurs de Verax ainsi que les actions associées

+
+ +
+ + + + - diff --git a/VeraxShield/VeraxShield/pages/utilisateurs/ModifierUtilisateur.razor b/VeraxShield/VeraxShield/pages/utilisateurs/ModifierUtilisateur.razor index 3f03520..0ec628f 100644 --- a/VeraxShield/VeraxShield/pages/utilisateurs/ModifierUtilisateur.razor +++ b/VeraxShield/VeraxShield/pages/utilisateurs/ModifierUtilisateur.razor @@ -2,5 +2,17 @@

Modifier l'utilisateur

+ + + + +
+ + + + +
+ + diff --git a/VeraxShield/VeraxShield/services/authentificationService/AuthentificationService.cs b/VeraxShield/VeraxShield/services/authentificationService/AuthentificationService.cs index ea18e2f..5dcae23 100644 --- a/VeraxShield/VeraxShield/services/authentificationService/AuthentificationService.cs +++ b/VeraxShield/VeraxShield/services/authentificationService/AuthentificationService.cs @@ -1,22 +1,25 @@ +using System.Linq; using System.Security.Claims; using VeraxShield.composants.formulaires.modeles; +using VeraxShield.modele.utilisateurs; +using VeraxShield.services.UtilisateursDataService; public class AuthentificationService : IAuthentificationService { - - private static readonly List utilisateursApplication; - - - - static AuthentificationService() + private List UtilisateursApplication {get; set;} + private IUtilisateursDataService _utilisateursDataService; + + public AuthentificationService(IUtilisateursDataService utilisateursDataService) { - utilisateursApplication = new List(); - utilisateursApplication.Add(new AppUtilisateur("Admin", "Admin", "admin")); + Console.WriteLine("Passage dans le constructeur !"); + this._utilisateursDataService = utilisateursDataService; + this.UtilisateursApplication = new List(); } - public void Connexion(RequeteConnexion requete) + public async Task Connexion(RequeteConnexion requete) { - var utilisateur = utilisateursApplication.FirstOrDefault(w => w.Nom == requete.Nom && w.MotDePasse == requete.MotDePasse); + await this.MajUtilisateurs(); + var utilisateur = this.UtilisateursApplication.FirstOrDefault(w => w.Pseudo == requete.Pseudo && w.Mdp == requete.MotDePasse); if (utilisateur == null) { @@ -24,9 +27,10 @@ public class AuthentificationService : IAuthentificationService } } - public UtilisateurCourant GetUtilisateur(string nom) + public async Task GetUtilisateur(string pseudo) { - var utilisateur = utilisateursApplication.FirstOrDefault(w => w.Nom == nom); + await this.MajUtilisateurs(); + var utilisateur = this.UtilisateursApplication.FirstOrDefault(w => w.Pseudo == pseudo); if (utilisateur == null) { @@ -34,18 +38,26 @@ public class AuthentificationService : IAuthentificationService } var claims = new List(); - claims.AddRange(utilisateur.Roles.Select(s => new Claim(ClaimTypes.Role, s))); + claims.Add(new Claim(ClaimTypes.Role, utilisateur.Role)); return new UtilisateurCourant { EstAuthentifie = true, - Nom = utilisateur.Nom, + Pseudo = utilisateur.Pseudo, Claims = claims.ToDictionary(c => c.Type, c => c.Value) }; } - public void Inscription(RequeteInscription requete) + public async Task Inscription(RequeteInscription requete) + { + await this._utilisateursDataService.AjouterUtilisateur(new Utilisateur(requete.Pseudo, requete.Nom, requete.Prenom, "invite", + requete.MotDePasse, requete.Mail, false)); + + await this.MajUtilisateurs(); + } + + public async Task MajUtilisateurs() { - utilisateursApplication.Add(new AppUtilisateur(requete.Nom, requete.MotDePasse, "invite" )); + this.UtilisateursApplication = await this._utilisateursDataService.getAllUtilisateurs(); } } \ No newline at end of file diff --git a/VeraxShield/VeraxShield/services/authentificationService/DonneurEtat.cs b/VeraxShield/VeraxShield/services/authentificationService/DonneurEtat.cs index 20e60eb..b04a393 100644 --- a/VeraxShield/VeraxShield/services/authentificationService/DonneurEtat.cs +++ b/VeraxShield/VeraxShield/services/authentificationService/DonneurEtat.cs @@ -1,30 +1,33 @@ using System.Security.Claims; using Microsoft.AspNetCore.Components.Authorization; using VeraxShield.composants.formulaires.modeles; +using VeraxShield.factories; +using VeraxShield.modele.utilisateurs; +using VeraxShield.services.UtilisateursDataService; public class DonneurEtat : AuthenticationStateProvider { private IAuthentificationService _serviceAuthentification; - private UtilisateurCourant _utilisateurCourant; + public UtilisateurCourant _utilisateurCourant; + private IUtilisateursDataService _utilisateursDataService; - public string NomUtilisateur => _utilisateurCourant?.Nom; - - public DonneurEtat(IAuthentificationService service) + public DonneurEtat(IAuthentificationService service, IUtilisateursDataService utilisateursDataService) { + this._utilisateursDataService = utilisateursDataService; this._serviceAuthentification = service; } public override Task GetAuthenticationStateAsync() { var identite = new ClaimsIdentity(); - + try { var userInfo = this.getUtilisateurCourant(); if (userInfo.EstAuthentifie) { - var claims = new[] { new Claim(ClaimTypes.Name, this._utilisateurCourant.Nom) }.Concat(this._utilisateurCourant.Claims.Select(c => new Claim(c.Key, c.Value))); + var claims = new[] { new Claim(ClaimTypes.Name, this._utilisateurCourant.Pseudo) }.Concat(this._utilisateurCourant.Claims.Select(c => new Claim(c.Key, c.Value))); identite = new ClaimsIdentity(claims, "Server authentication"); } } @@ -36,7 +39,7 @@ public class DonneurEtat : AuthenticationStateProvider return Task.FromResult(new AuthenticationState(new ClaimsPrincipal(identite))); } - private UtilisateurCourant getUtilisateurCourant() + public UtilisateurCourant getUtilisateurCourant() { if (this._utilisateurCourant != null && this._utilisateurCourant.EstAuthentifie) { @@ -48,10 +51,10 @@ public class DonneurEtat : AuthenticationStateProvider public async Task Connexion(RequeteConnexion requete) { - this._serviceAuthentification.Connexion(requete); + await this._serviceAuthentification.Connexion(requete); // No error - Login the user - var user = this._serviceAuthentification.GetUtilisateur(requete.Nom); + var user = await this._serviceAuthentification.GetUtilisateur(requete.Pseudo); this._utilisateurCourant = user; NotifyAuthenticationStateChanged(GetAuthenticationStateAsync()); @@ -65,12 +68,13 @@ public class DonneurEtat : AuthenticationStateProvider public async Task Inscription(RequeteInscription requete) { - this._serviceAuthentification.Inscription(requete); + await this._serviceAuthentification.Inscription(requete); // No error - Login the user - var user = this._serviceAuthentification.GetUtilisateur(requete.Nom); - this._utilisateurCourant = user; + // var user = await this._serviceAuthentification.GetUtilisateur(requete.Nom); + // this._utilisateurCourant = user; NotifyAuthenticationStateChanged(GetAuthenticationStateAsync()); } + } \ No newline at end of file diff --git a/VeraxShield/VeraxShield/services/authentificationService/IAuthentificationService.cs b/VeraxShield/VeraxShield/services/authentificationService/IAuthentificationService.cs index 8fc7045..6665618 100644 --- a/VeraxShield/VeraxShield/services/authentificationService/IAuthentificationService.cs +++ b/VeraxShield/VeraxShield/services/authentificationService/IAuthentificationService.cs @@ -2,7 +2,7 @@ using VeraxShield.composants.formulaires.modeles; public interface IAuthentificationService { - public UtilisateurCourant GetUtilisateur(String nom); - public void Connexion(RequeteConnexion requete); - public void Inscription(RequeteInscription requete); + public Task GetUtilisateur(String nom); + public Task Connexion(RequeteConnexion requete); + public Task Inscription(RequeteInscription requete); } \ No newline at end of file diff --git a/VeraxShield/VeraxShield/wwwroot/css/composants/affichages/utilisateurs/datagridUtilisateurs.css b/VeraxShield/VeraxShield/wwwroot/css/composants/affichages/utilisateurs/datagridUtilisateurs.css new file mode 100644 index 0000000..b35a74c --- /dev/null +++ b/VeraxShield/VeraxShield/wwwroot/css/composants/affichages/utilisateurs/datagridUtilisateurs.css @@ -0,0 +1,16 @@ +.darkBlue { + color: #053679; +} + +.editButton { + background-color: #053679; + border: none; + color: white; +} + +.biggest{ + font-weight: bold; + font-size:120%; +} + + diff --git a/VeraxShield/VeraxShield/wwwroot/css/composants/authentification/FormulaireConnexion.css b/VeraxShield/VeraxShield/wwwroot/css/composants/authentification/FormulaireConnexion.css index e206d57..e8edfff 100644 --- a/VeraxShield/VeraxShield/wwwroot/css/composants/authentification/FormulaireConnexion.css +++ b/VeraxShield/VeraxShield/wwwroot/css/composants/authentification/FormulaireConnexion.css @@ -5,6 +5,8 @@ box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Ajoute une ombre légère */ } + + .field-container { margin-bottom: 15px; } @@ -31,11 +33,15 @@ } .btn-se-connecter { - background-color: darkblue; + background-color: #053679; color: white; } + .btn-se-connecter:hover, .btn-s-inscrire:hover { + background-color: #afc1db; + color: #053679; + } -.btn-s-inscrire { - background-color: grey; - color: white; -} + .btn-s-inscrire { + background-color: grey; + color: white; + } diff --git a/VeraxShield/VeraxShield/wwwroot/css/index.css b/VeraxShield/VeraxShield/wwwroot/css/index.css new file mode 100644 index 0000000..f86e667 --- /dev/null +++ b/VeraxShield/VeraxShield/wwwroot/css/index.css @@ -0,0 +1,84 @@ +/*Not Authorized + --------------------------------------------------- +*/ + +body { + background-color: white; + margin: 0; + padding: 0; + font-family: Arial, sans-serif; + width: 100%; +} + +header { + color: #053679; + text-align: center; + padding: 10px; + margin: 0; + background-color: #afc1db; +} + +main { + display: flex; + justify-content: center; + align-items: center; + height: 80vh; + margin-top:10vh; +} + +.center-box { + background-color: #afc1db; + padding: 20px; + text-align: center; + border-radius: 10px; +} + +.button-container { + margin-top: 10px; + display: flex; + justify-content: center; + align-items: center; +} + +.btn-link { + color: white; + background-color: #053679; + margin: 5px; + padding: 10px; + border: none; + border-radius: 5px; + display: block; + cursor: pointer; + width:100%; +} + + .btn-link:hover { + background-color: white; + color: #053679; + } + + /*Authorized + --------------------------------------------------- +*/ + + .navbar { + background-color: #053679; +} + +.btn-navbar { + color: white; + background-color: none; +} + + .btn-navbar:hover { + color: #afc1db; + } + +.home-center-box { + background-color: #afc1db; + padding: 40px; + text-align: center; + border-radius: 10px; + width: 80%; +} + diff --git a/VeraxShield/VeraxShield/wwwroot/css/pages/authentification/Inscription.css b/VeraxShield/VeraxShield/wwwroot/css/pages/authentification/Inscription.css new file mode 100644 index 0000000..bf0bef1 --- /dev/null +++ b/VeraxShield/VeraxShield/wwwroot/css/pages/authentification/Inscription.css @@ -0,0 +1,20 @@ +.centrer-composant { + display: flex; + justify-content: center; + align-items: center; + height: 100vh; +} + +.formulaire-inscription { + width: 53%; + /* border: 2px solid black; + border-radius: 10px; */ + /* padding: 20px; */ +} + +body { + background-image: url('/ressources/images/fondPages/fondConnexion.webp'); + background-size: cover; + background-position: center; + background-repeat: no-repeat; +} \ No newline at end of file diff --git a/VeraxShield/VeraxShield/wwwroot/css/pages/erreurs/ErreurParDefaut.css b/VeraxShield/VeraxShield/wwwroot/css/pages/erreurs/ErreurParDefaut.css new file mode 100644 index 0000000..3cf288b --- /dev/null +++ b/VeraxShield/VeraxShield/wwwroot/css/pages/erreurs/ErreurParDefaut.css @@ -0,0 +1,4 @@ +/* body { + background-color: #8BC6EC; + background-image: linear-gradient(135deg, #8BC6EC 0%, #9599E2 100%); +} */ \ No newline at end of file diff --git a/VeraxShield/VeraxShield/wwwroot/css/pages/utilisateurs/ModifierUtilisateur.css b/VeraxShield/VeraxShield/wwwroot/css/pages/utilisateurs/ModifierUtilisateur.css new file mode 100644 index 0000000..09b6945 --- /dev/null +++ b/VeraxShield/VeraxShield/wwwroot/css/pages/utilisateurs/ModifierUtilisateur.css @@ -0,0 +1,9 @@ +.test { + /* background-color: white; */ + background-color: #8EC5FC; + background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%); + + padding: 20px; + border-radius: 10px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Ajoute une ombre légère */ +} \ No newline at end of file diff --git a/VeraxShield/VeraxShield/wwwroot/css/pages/utilisateurs/listeUtilisateurs.css b/VeraxShield/VeraxShield/wwwroot/css/pages/utilisateurs/listeUtilisateurs.css new file mode 100644 index 0000000..bd50371 --- /dev/null +++ b/VeraxShield/VeraxShield/wwwroot/css/pages/utilisateurs/listeUtilisateurs.css @@ -0,0 +1,27 @@ +.h1{ + text-align:center; + margin: 50px; +} + +.margin10{ + margin: 10px; +} + +.center-box { + padding: 20px; + margin: 20px auto; + text-align: center; + border-radius: 10px; + background-color: #afc1db; + width: 80%; +} + +.dataGrid { + margin: 10px auto; + width: 80%; +} + +.btn:hover { + background-color: #afc1db; + color: #053679; +} \ No newline at end of file diff --git a/VeraxShield/VeraxShield/wwwroot/data/fakeUtilisateurs.json b/VeraxShield/VeraxShield/wwwroot/data/fakeUtilisateurs.json index 60a0225..1e3698a 100644 --- a/VeraxShield/VeraxShield/wwwroot/data/fakeUtilisateurs.json +++ b/VeraxShield/VeraxShield/wwwroot/data/fakeUtilisateurs.json @@ -17,6 +17,15 @@ "Mdp": "SecretPassword456", "IsBan": true }, + { + "Pseudo": "Admin", + "Mail": "Admin.admin@admin.com", + "Nom": "Admin", + "Prenom": "Admin", + "Role": "admin", + "Mdp": "Admin", + "IsBan": false + }, { "Pseudo": "alice_jones", "Mail": "alice.jones@example.com",