This commit is contained in:
Professional 2025-05-24 00:19:05 +07:00
parent f653ecf96c
commit 71af218a09

View File

@ -8,14 +8,16 @@
<h1 class="section-title">Мой профиль</h1> <h1 class="section-title">Мой профиль</h1>
<p class="subtitle">Управление личными данными и настройками</p> <p class="subtitle">Управление личными данными и настройками</p>
</div> </div>
<div class="header-actions"> <!-- Переносим кнопку редактирования в заголовок и делаем её меньше -->
<div class="header-actions" v-if="profileData && !initialLoading">
<button <button
class="action-btn primary" class="edit-btn"
@click="toggleEditMode" @click="toggleEditMode"
:disabled="loading" :disabled="loading"
> >
<i class="icon" :class="isEditMode ? 'bi-eye' : 'bi-pencil'"></i> <i v-if="!isEditMode" class="bi-pencil"></i>
{{ isEditMode ? 'Просмотр' : 'Редактировать' }} <i v-else class="bi-check"></i>
{{ isEditMode ? 'Сохранить' : 'Редактировать' }}
</button> </button>
</div> </div>
</div> </div>
@ -76,11 +78,13 @@
<span class="badge member-since">С {{ formatShortDate(profileData.createdAt) }}</span> <span class="badge member-since">С {{ formatShortDate(profileData.createdAt) }}</span>
</div> </div>
<!-- Кнопка выхода из аккаунта --> <!-- Центрируем кнопку выхода из аккаунта -->
<button @click="logoutUser" class="logout-btn"> <div class="logout-section">
<i class="bi-box-arrow-right"></i> <button @click="logoutUser" class="logout-btn">
Выйти из аккаунта <i class="bi-box-arrow-right"></i>
</button> Выйти из аккаунта
</button>
</div>
</div> </div>
</div> </div>
@ -120,7 +124,7 @@
<!-- Details Section --> <!-- Details Section -->
<div class="details-section"> <div class="details-section">
<!-- Basic Info --> <!-- Basic Info -->
<div class="info-card"> <div class="info-card basic-info-card">
<div class="card-header"> <div class="card-header">
<h3><i class="bi-person-lines-fill"></i> Основная информация</h3> <h3><i class="bi-person-lines-fill"></i> Основная информация</h3>
</div> </div>
@ -251,7 +255,7 @@
</div> </div>
<!-- Photos Section --> <!-- Photos Section -->
<div class="info-card" id="photos-section"> <div class="info-card photos-card" id="photos-section">
<div class="card-header"> <div class="card-header">
<h3><i class="bi-images"></i> Мои фотографии</h3> <h3><i class="bi-images"></i> Мои фотографии</h3>
<div class="header-actions" v-if="profileData.photos && profileData.photos.length > 0"> <div class="header-actions" v-if="profileData.photos && profileData.photos.length > 0">
@ -1171,8 +1175,8 @@ onUnmounted(() => {
.profile-title { .profile-title {
flex: 1; flex: 1;
text-align: center; text-align: center;
/* Добавляем отступы чтобы заголовок не перекрывался кнопкой */ /* Уменьшаем отступы для лучшего баланса */
padding: 0 60px; padding: 0 20px;
} }
.section-title { .section-title {
@ -1194,14 +1198,69 @@ onUnmounted(() => {
} }
.header-actions { .header-actions {
position: absolute; /* Убираем абсолютное позиционирование для лучшего отображения */
right: 0; display: flex;
top: 50%; align-items: center;
transform: translateY(-50%);
/* Уменьшаем z-index чтобы не перекрывать заголовок */
z-index: 2; z-index: 2;
} }
/* Стили для кнопки редактирования в заголовке */
.edit-btn {
background: rgba(255, 255, 255, 0.2);
border: 1px solid rgba(255, 255, 255, 0.3);
color: white;
padding: 0.5rem 1rem;
border-radius: 25px;
font-size: 0.85rem;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
gap: 0.4rem;
backdrop-filter: blur(10px);
}
.edit-btn:hover {
background: rgba(255, 255, 255, 0.3);
border-color: rgba(255, 255, 255, 0.5);
transform: translateY(-1px);
}
.edit-btn:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none;
}
/* Центрирование кнопки выхода */
.logout-section {
display: flex;
justify-content: center;
margin-top: 0.5rem;
}
.logout-btn {
background: none;
border: none;
color: #dc3545;
cursor: pointer;
font-size: 0.85rem;
display: flex;
align-items: center;
gap: 0.3rem;
padding: 0.5rem 1rem;
border-radius: 25px;
transition: all 0.3s ease;
border: 1px solid transparent;
}
.logout-btn:hover {
color: #c82333;
background: rgba(220, 53, 69, 0.1);
border-color: rgba(220, 53, 69, 0.2);
}
/* Main Content - ИСПРАВЛЕНО */ /* Main Content - ИСПРАВЛЕНО */
.profile-content { .profile-content {
flex: 1; flex: 1;
@ -1362,12 +1421,16 @@ onUnmounted(() => {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 0.3rem; gap: 0.3rem;
padding: 0.25rem 0; padding: 0.5rem 1rem;
transition: color 0.3s ease; border-radius: 25px;
transition: all 0.3s ease;
border: 1px solid transparent;
} }
.logout-btn:hover { .logout-btn:hover {
color: #c82333; color: #c82333;
background: rgba(220, 53, 69, 0.1);
border-color: rgba(220, 53, 69, 0.2);
} }
/* Stats Section */ /* Stats Section */
@ -1433,6 +1496,14 @@ onUnmounted(() => {
margin-bottom: 1rem; margin-bottom: 1rem;
} }
.basic-info-card {
margin-bottom: 2rem;
}
.photos-card {
margin-top: 2rem;
}
.card-header { .card-header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;