Исправление багов авторизации, корзины и админки

- Исправлено выпадающее меню профиля (hover-баг с margin-top)
- Исправлена авторизация: правильные пути к API (api/auth.php)
- Исправлены ссылки на админку (admin/index.php вместо admin_panel.php)
- Исправлены пути API корзины в catalog.php и checkout.php
- Добавлена форма добавления/редактирования товаров в админке
- Исправлены кнопки +/- в корзине (улучшена обработка AJAX)
- Исправлена регистрация: правильные пути и обработка boolean в PostgreSQL
- Добавлена миграция для назначения прав админа пользователю admin@mail.ru
- Удален тестовый блок 'Быстрый вход' для неавторизованных пользователей
- Улучшена обработка ошибок во всех API-эндпоинтах
This commit is contained in:
kirill.khorkov
2025-12-16 02:58:44 +03:00
parent 3f257120fa
commit 29b9aaac50
388 changed files with 15312 additions and 3220 deletions

View File

@@ -0,0 +1,142 @@
.error-message {
color: #ff0000;
font-size: 12px;
margin-top: 5px;
display: none;
}
.form__input.error {
border-color: #ff0000;
}
.form__group {
position: relative;
margin-bottom: 15px;
}
/* Стили для сообщений внизу страницы */
.page-messages {
position: fixed;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
z-index: 1000;
width: 90%;
max-width: 500px;
}
.message {
padding: 15px;
margin: 10px 0;
border-radius: 5px;
text-align: center;
font-weight: bold;
display: none;
}
.message.error {
background-color: #ffebee;
color: #c62828;
border: 1px solid #ffcdd2;
}
.message.success {
background-color: #e8f5e9;
color: #453227;
border: 1px solid #c8e6c9;
}
.message.warning {
background-color: #fff3e0;
color: #ef6c00;
border: 1px solid #ffe0b2;
}
.privacy-error {
color: #ff0000;
font-size: 12px;
margin-top: 5px;
display: none;
text-align: center;
}
/* Дополнительные стили для формы регистрации */
.input-group {
position: relative;
margin-bottom: 20px;
}
.profile-form input.error {
border-color: #ff0000;
background-color: #fff5f5;
}
.privacy-checkbox {
margin: 20px 0;
text-align: center;
}
.privacy-checkbox label {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
cursor: pointer;
font-size: 14px;
}
.privacy-checkbox input[type="checkbox"] {
margin: 0;
}
/* Исправление отступов для страницы регистрации */
.profile-page-main {
padding: 40px 0;
min-height: calc(100vh - 200px);
}
/* Убедимся, что контейнер не перекрывает шапку и футер */
.profile-container {
margin: 0 auto;
position: relative;
z-index: 1;
}
.input-hint {
font-size: 12px;
color: #666;
margin-top: 5px;
}
/* Стили для страницы входа */
.form-options {
display: flex;
justify-content: space-between;
align-items: center;
margin: 20px 0;
}
.remember-me {
display: flex;
align-items: center;
gap: 8px;
font-size: 14px;
color: #453227;
}
.remember-me input[type="checkbox"] {
width: 16px;
height: 16px;
cursor: pointer;
}
.forgot-password {
font-size: 14px;
color: #453227;
text-decoration: underline;
}
.forgot-password:hover {
color: #617365;
text-decoration: none;
}

View File

@@ -0,0 +1,86 @@
// ===================================
// === ПЕРЕМЕННЫЕ И МИКСИНЫ AETERNA ===
// ===================================
@color-primary: #617365;
@color-secondary: #D1D1D1;
@color-accent: #453227;
@color-text-dark: #333;
@color-text-light: #fff;
@color-button: @color-accent;
@color-beige: #A2A09A;
@font-logo: 'Anek Kannada', sans-serif;
@font-main: 'Anonymous Pro', monospace;
@font-heading: 'Playfair Display', serif;
@shadow-light: 0 5px 15px rgba(0, 0, 0, 0.2);
@shadow-dark: 2px 2px 4px rgba(0, 0, 0, 0.3);
.flex-center(@gap: 0) {
display: flex;
align-items: center;
justify-content: center;
gap: @gap;
}
.flex-between() {
display: flex;
align-items: center;
justify-content: space-between;
}
.flex-column() {
display: flex;
flex-direction: column;
}
.icon-base(@size: 18px, @hover-scale: 1.1) {
cursor: pointer;
transition: all 0.3s ease;
font-size: @size;
&:hover {
transform: scale(@hover-scale);
}
}
.image-overlay() {
position: absolute;
inset: 0;
.flex-center(15px);
flex-direction: column;
text-align: center;
background-color: rgba(0, 0, 0, 0.4);
padding: 20px;
color: @color-text-light;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
transition: all 0.3s ease;
}
.menu-base() {
position: absolute;
top: 100%;
left: 0;
width: 250px;
background: white;
border-radius: 8px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
padding: 15px;
z-index: 1000;
margin-top: 5px;
display: none;
}
.input-base() {
width: 100%;
padding: 12px 15px;
border: 1px solid #ccc;
background-color: #fff;
font-family: @font-main;
font-size: 14px;
outline: none;
transition: border-color 0.3s ease;
&:focus {
border-color: @color-primary;
}
}

File diff suppressed because it is too large Load Diff