Site
- fix bug login button
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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()
|
||||
{
|
||||
const loginButton = document.getElementById('loginButton');
|
||||
|
@ -6,11 +6,12 @@
|
||||
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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 { Login } from '/static/javascript/login/main.js'
|
||||
|
||||
let userMeInfo = {
|
||||
username: "",
|
||||
@ -65,6 +66,7 @@ function typeLogin(content)
|
||||
loginButton.replaceChild(usernameNode, pLoginButton);
|
||||
CN.new("Connected successfully", "Welcome " + userMeInfo.username, CN.defaultIcon.success);
|
||||
popout.style.display = 'none';
|
||||
Login.changeEventLoginButton();
|
||||
}
|
||||
}
|
||||
loginAvailable = true;
|
||||
|
Reference in New Issue
Block a user