From 038c877aed55cffdb4401a4c7e7b15b113798145 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Tue, 22 Nov 2022 22:55:36 +0100 Subject: Implemented game creation --- views/games.ejs | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'views/games.ejs') diff --git a/views/games.ejs b/views/games.ejs index 3189be8..9cee7bb 100644 --- a/views/games.ejs +++ b/views/games.ejs @@ -7,11 +7,31 @@ PartieJoueur 1Joueur 2 <% games.forEach((game) => { %> - <%= game.data.title %> - <%= game.data.player1.name %> - <%= game.data.player2.name %> + <%= game.data.name %> + <%= game.data.player1.username %> + <%= game.data.player2.username %> <% }) %> <% } %> +<% if (Object.keys(errors).length === 0) { %> +

Nouvelle partie

+<% } else { %> +

Oops, erreur lors de la création d'une nouvelle partie!

+<% } %> +
+
+ + <% if (errors.username) { %> + + <% } %> +
+
+ + <% if (errors.name) { %> + + <% } %> +
+ +
<%- include("footer") %> -- cgit v1.2.3