FEAT : Mise en place de l'architecture + instription d'un utilisateur

This commit is contained in:
2025-12-01 12:14:57 +01:00
parent c76592aa65
commit 6f9bbe47ab
41 changed files with 672 additions and 3 deletions

View File

@@ -0,0 +1,9 @@
<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head><meta charset="utf-8"/><title>Accueil</title></head>
<body>
<h1>Bienvenue sur FotoSharing</h1>
<p><a th:href="@{/upload}">Uploader une photo</a></p>
<p><a th:href="@{/logout}">Se déconnecter</a></p>
</body>
</html>

View File

@@ -0,0 +1,23 @@
<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8"/>
<title>Login - FotoSharing</title>
</head>
<body>
<h1>Connexion</h1>
<form th:action="@{/login}" method="post">
<label>Email: <input type="text" name="username"/></label><br/>
<label>Mot de passe: <input type="password" name="password"/></label><br/>
<button type="submit">Se connecter</button>
</form>
<div th:if="${param.logout}">
Déconnecté avec succès.
</div>
<div th:if="${param.error}">
Erreur d'authentification.
</div>
<p><a th:href="@{/register}">Créer un compte</a></p>
</body>
</html>

View File

@@ -0,0 +1,17 @@
<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8"/>
<title>Inscription - FotoSharing</title>
</head>
<body>
<h1>Inscription</h1>
<form th:action="@{/register}" th:object="${utilisateur}" method="post">
<label>Email: <input th:field="*{email}" /></label><br/>
<label>Nom: <input th:field="*{nom}" /></label><br/>
<label>Prénom: <input th:field="*{prenom}" /></label><br/>
<label>Mot de passe: <input th:field="*{motDePasse}" type="password"/></label><br/>
<button type="submit">Créer</button>
</form>
</body>
</html>

View File

@@ -0,0 +1,23 @@
<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8"/>
<title>Upload - FotoSharing</title>
</head>
<body>
<h1>Uploader une photo</h1>
<form th:action="@{/upload}" method="post" enctype="multipart/form-data">
<input type="file" name="file"/><br/>
<label>Visibilité:
<select name="visibilite">
<option value="PRIVATE">Privée</option>
<option value="PUBLIC">Publique</option>
<option value="SHARED">Partagée</option>
</select>
</label><br/>
<button type="submit">Envoyer</button>
</form>
<div th:if="${error}" th:text="${error}"></div>
<div th:if="${message}" th:text="${message}"></div>
</body>
</html>