From 4130e55f747783e2dc5a22f7fc6e8b6d8dfc361e Mon Sep 17 00:00:00 2001 From: bitsearch Date: Sat, 10 Jan 2026 00:17:24 +0100 Subject: [PATCH] ajout de methode pour parler a backend et database --- srcs/frontend/src/windows.js | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/srcs/frontend/src/windows.js b/srcs/frontend/src/windows.js index 88040c1..fc3024c 100644 --- a/srcs/frontend/src/windows.js +++ b/srcs/frontend/src/windows.js @@ -86,14 +86,27 @@ export class LoginWindow extends fenetre { this.body.style.gap = "8px"; } + connexion(){ + console.log("methode connexion lancée"); + } + + inscription(){ + console.log("methode inscription lancée"); + } + bindEvents() { this.switch.onclick = () => this.toggleMode(); this.submit.onclick = () => { - this.message.innerText = - this.mode === "login" - ? "Tentative de connexion..." - : "Tentative d'inscription..."; + this.message.innerText = this.mode === "login" + ? "Tentative de connexion..." + : "Tentative d'inscription..."; + if (this.mode === "login"){ + this.connexion(); + } + else { + this.inscription(); + } }; }