- fix bug login button
This commit is contained in:
Kum1ta
2024-10-08 23:33:12 +02:00
parent 95c8d62e7c
commit 7be1d3ae9f
3 changed files with 16 additions and 3 deletions

View File

@ -25,7 +25,7 @@ urlpatterns = [
path("multiOnlineGamePage", views.multiOnlineGamePage, name='multiOnlineGamePage'), path("multiOnlineGamePage", views.multiOnlineGamePage, name='multiOnlineGamePage'),
path("waitingGamePage", views.waitingGamePage, name='waitingGamePage'), path("waitingGamePage", views.waitingGamePage, name='waitingGamePage'),
path("profilPage", views.profilPage, name='profilPage'), path("profilPage", views.profilPage, name='profilPage'),
# path("game", views.game, name='game'), path("game", views.game, name='game'),
path("wait_game", views.game, name='wait_game'), path("wait_game", views.game, name='wait_game'),
path("tournament", views.tournament, name='tournament'), path("tournament", views.tournament, name='tournament'),
path("login42", views.login42, name='login42'), path("login42", views.login42, name='login42'),

View File

@ -6,7 +6,7 @@
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */ /* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/07 17:40:15 by edbernar #+# #+# */ /* Created: 2024/08/07 17:40:15 by edbernar #+# #+# */
/* Updated: 2024/10/06 17:01:31 by edbernar ### ########.fr */ /* Updated: 2024/10/08 23:32:11 by edbernar ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -65,6 +65,17 @@ class Login
} }
} }
static changeEventLoginButton()
{
const loginButton = document.getElementById('loginButton');
loginButton.removeEventListener('click', showLoginDiv);
loginButton.addEventListener('click', showMenu);
window.addEventListener('resize', movePopMenuLoginButton);
movePopMenuLoginButton();
initButtonPopMenuLogin();
}
static dispose() static dispose()
{ {
const loginButton = document.getElementById('loginButton'); const loginButton = document.getElementById('loginButton');

View File

@ -6,11 +6,12 @@
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */ /* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/02 00:39:53 by edbernar #+# #+# */ /* Created: 2024/08/02 00:39:53 by edbernar #+# #+# */
/* Updated: 2024/09/29 03:35:43 by edbernar ### ########.fr */ /* Updated: 2024/10/08 23:32:12 by edbernar ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
import { createNotification as CN } from "/static/javascript/notification/main.js"; import { createNotification as CN } from "/static/javascript/notification/main.js";
import { Login } from '/static/javascript/login/main.js'
let userMeInfo = { let userMeInfo = {
username: "", username: "",
@ -65,6 +66,7 @@ function typeLogin(content)
loginButton.replaceChild(usernameNode, pLoginButton); loginButton.replaceChild(usernameNode, pLoginButton);
CN.new("Connected successfully", "Welcome " + userMeInfo.username, CN.defaultIcon.success); CN.new("Connected successfully", "Welcome " + userMeInfo.username, CN.defaultIcon.success);
popout.style.display = 'none'; popout.style.display = 'none';
Login.changeEventLoginButton();
} }
} }
loginAvailable = true; loginAvailable = true;