замена залотого цвета и добавление кнопки выхода

This commit is contained in:
Professional 2025-05-23 22:20:54 +07:00
parent fb5efca037
commit 485119fa4d
4 changed files with 53 additions and 22 deletions

View File

@ -1079,7 +1079,7 @@ onMounted(async () => {
}
.user-name {
background: linear-gradient(45deg, #FFD700, #FFA500);
background: linear-gradient(45deg, #00BFFF, #20B2AA);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
@ -1169,7 +1169,7 @@ onMounted(async () => {
bottom: -10px;
height: 4px;
width: 60px;
background: linear-gradient(90deg, #FFD700, #FFA500);
background: linear-gradient(90deg, #00BFFF, #20B2AA);
border-radius: 2px;
}
@ -1440,17 +1440,4 @@ onMounted(async () => {
font-size: 0.85rem;
}
}
/* Исправления Safari */
@supports (-webkit-touch-callout: none) {
.letter, .logo-letter, .user-name, .stat-info h3 {
background-clip: text;
-webkit-text-fill-color: transparent;
}
.welcome-card h1 {
background-clip: text;
-webkit-text-fill-color: transparent;
}
}
</style>

View File

@ -245,7 +245,7 @@ const handleLogin = async () => {
width: 100%;
padding: 1rem;
margin-top: 1rem;
background: linear-gradient(45deg, #FFD700, #FFA500);
background: linear-gradient(45deg, #00BFFF, #20B2AA);
border: none;
border-radius: 12px;
color: white;
@ -277,7 +277,7 @@ const handleLogin = async () => {
.action-button:hover {
transform: translateY(-3px);
box-shadow: 0 7px 15px rgba(255, 215, 0, 0.3);
box-shadow: 0 7px 15px rgba(0, 191, 255, 0.3);
}
.action-button:disabled {
@ -307,7 +307,7 @@ const handleLogin = async () => {
}
.auth-link {
color: #FFD700;
color: #20B2AA;
text-decoration: none;
font-weight: 600;
transition: all 0.3s ease;

View File

@ -74,6 +74,12 @@
<span class="badge verified">Подтвержден</span>
<span class="badge member-since">С {{ formatShortDate(profileData.createdAt) }}</span>
</div>
<!-- Кнопка выхода из аккаунта -->
<button @click="logoutUser" class="logout-btn">
<i class="bi-box-arrow-right"></i>
Выйти из аккаунта
</button>
</div>
</div>
@ -367,7 +373,7 @@ import { ref, onMounted, computed, watch, nextTick } from 'vue';
import { useAuth } from '@/auth';
import api from '@/services/api';
const { isAuthenticated, user: authUserFromStore, token, fetchUser } = useAuth();
const { isAuthenticated, user: authUserFromStore, token, fetchUser, logout } = useAuth();
const profileData = ref(null);
const loading = ref(true);
const initialLoading = ref(true);
@ -923,6 +929,15 @@ const clearProfileMessages = () => {
profileActionSuccess.value = '';
};
// Функция выхода из аккаунта
const logoutUser = async () => {
try {
await logout();
console.log('[ProfileView] Пользователь успешно вышел из системы');
} catch (error) {
console.error('[ProfileView] Ошибка при выходе из системы:', error);
}
};
watch(authUserFromStore, (newUser) => {
if (newUser) {
@ -1826,4 +1841,33 @@ onMounted(async () => {
background: rgba(220, 53, 69, 0.1);
opacity: 1;
}
/* Logout Button */
.logout-btn {
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
background: linear-gradient(45deg, #f74054, #ff5e57);
color: white;
border: none;
padding: 0.6rem 1.2rem;
border-radius: 50px;
margin-top: 1rem;
font-size: 0.9rem;
font-weight: 600;
width: 100%;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 4px 10px rgba(247, 64, 84, 0.3);
}
.logout-btn:hover {
transform: translateY(-2px);
box-shadow: 0 6px 15px rgba(247, 64, 84, 0.4);
}
.logout-btn i {
font-size: 1.1rem;
}
</style>

View File

@ -294,7 +294,7 @@ const handleRegister = async () => {
width: 100%;
padding: 1rem;
margin-top: 1rem;
background: linear-gradient(45deg, #FFD700, #FFA500);
background: linear-gradient(45deg, #00BFFF, #20B2AA);
border: none;
border-radius: 12px;
color: white;
@ -326,7 +326,7 @@ const handleRegister = async () => {
.action-button:hover {
transform: translateY(-3px);
box-shadow: 0 7px 15px rgba(255, 215, 0, 0.3);
box-shadow: 0 7px 15px rgba(0, 191, 255, 0.3);
}
.action-button:disabled {
@ -356,7 +356,7 @@ const handleRegister = async () => {
}
.auth-link {
color: #FFD700;
color: #20B2AA;
text-decoration: none;
font-weight: 600;
transition: all 0.3s ease;