modified: backend/app.py
modified: frontend/index.html modified: frontend/js/app.js
This commit is contained in:
@@ -87,6 +87,7 @@ function initAuth() {
|
||||
const authForm = document.getElementById('auth-form');
|
||||
const toggleBtn = document.getElementById('auth-toggle');
|
||||
const title = document.getElementById('auth-title');
|
||||
const submitBtn = document.getElementById('auth-submit-btn');
|
||||
const logoutBtn = document.getElementById('logout-btn');
|
||||
|
||||
toggleBtn.addEventListener('click', (e) => {
|
||||
@@ -94,6 +95,7 @@ function initAuth() {
|
||||
isLoginMode = !isLoginMode;
|
||||
title.textContent = isLoginMode ? 'Вход в систему' : 'Регистрация';
|
||||
toggleBtn.textContent = isLoginMode ? 'Нет аккаунта? Зарегистрироваться' : 'Уже есть аккаунт? Войти';
|
||||
submitBtn.textContent = isLoginMode ? 'Войти' : 'Зарегистрироваться';
|
||||
});
|
||||
|
||||
authForm.addEventListener('submit', async (e) => {
|
||||
@@ -110,6 +112,7 @@ function initAuth() {
|
||||
isLoginMode = true;
|
||||
title.textContent = 'Вход в систему';
|
||||
toggleBtn.textContent = 'Нет аккаунта? Зарегистрироваться';
|
||||
submitBtn.textContent = 'Войти';
|
||||
return;
|
||||
}
|
||||
window.location.reload();
|
||||
|
||||
Reference in New Issue
Block a user