modified: serv_nginx/bbvue/src/stores/auth.js

renamed:    serv_nginx/bbvue/src/stores/user.js -> serv_nginx/bbvue/src/stores/user_store.js
	modified:   serv_nginx/bbvue/src/views/Members.vue
search-input width is corrected
This commit is contained in:
2025-10-20 20:54:53 +05:00
parent 79d79eb70d
commit b75c0b4f2b
3 changed files with 6 additions and 25 deletions
+2
View File
@@ -3,6 +3,7 @@ import { defineStore } from 'pinia'
import { ref, computed } from 'vue' import { ref, computed } from 'vue'
import { apiClient, withLoading } from './helpers/api' import { apiClient, withLoading } from './helpers/api'
import { handleApiError } from './helpers/api'; import { handleApiError } from './helpers/api';
import { userStore } from './user_store'
export const useAuthStore = defineStore('auth', () => { export const useAuthStore = defineStore('auth', () => {
// State // State
@@ -68,6 +69,7 @@ export const useAuthStore = defineStore('auth', () => {
const logout = async () => { const logout = async () => {
return withLoading({ loading, error }, async () => { return withLoading({ loading, error }, async () => {
try { try {
userStore.resetUserStore()
await apiClient.post('/auth/logout') await apiClient.post('/auth/logout')
} catch (err) { } catch (err) {
console.error('Logout error:', err) console.error('Logout error:', err)
@@ -160,29 +160,8 @@ export const useUserStore = defineStore('user', () => {
personalBests.value = response.data personalBests.value = response.data
return { success: true, data: personalBests.value } return { success: true, data: personalBests.value }
} catch (error) { } catch (error) {
console.warn('Personal bests endpoint not available, using mock data', error) console.warn('Personal bests 1endpoint not available, using mock data', error)
personalBests.value = [ personalBests.value = []
{
id: 1,
distanceType: '5k',
time: '23:45',
pace: '4:45',
date: '2024-02-15',
verified: true,
eventName: 'Парковый забег',
location: 'Центральный парк'
},
{
id: 2,
distanceType: '10k',
time: '48:15',
pace: '4:49',
date: '2024-03-10',
verified: true,
eventName: 'Весенний марафон',
location: 'Набережная'
}
]
return { success: true, data: personalBests.value } return { success: true, data: personalBests.value }
} }
}) })
+1 -1
View File
@@ -847,7 +847,7 @@ export default {
} }
.search-input { .search-input {
width: 100%; width: 80%;
padding: 15px 20px; padding: 15px 20px;
border: 2px solid #e9ecef; border: 2px solid #e9ecef;
border-radius: 25px; border-radius: 25px;