ваше сообщение коммита

This commit is contained in:
2025-04-02 14:21:16 +03:00
parent cb75f98fa7
commit 084c72462c
7 changed files with 82 additions and 779 deletions

View File

@@ -6,18 +6,18 @@ export function useAuth() {
const authType = ref(null);
const userId = ref(null);
const address = ref(null);
const telegramInfo = ref(null);
const isAdmin = ref(false);
const telegramId = ref(null);
const isAdmin = ref(false);
const email = ref(null);
const updateAuth = ({ authenticated, authType: newAuthType, userId: newUserId, address: newAddress, telegramId: newTelegramId, isAdmin: newIsAdmin }) => {
const updateAuth = ({ authenticated, authType: newAuthType, userId: newUserId, address: newAddress, telegramId: newTelegramId, isAdmin: newIsAdmin, email: newEmail }) => {
isAuthenticated.value = authenticated;
authType.value = newAuthType;
userId.value = newUserId;
address.value = newAddress;
telegramId.value = newTelegramId;
isAdmin.value = newIsAdmin;
email.value = newEmail;
};
const checkAuth = async () => {
@@ -49,6 +49,7 @@ export function useAuth() {
userId: null,
address: null,
telegramId: null,
email: null,
isAdmin: false
});
@@ -58,9 +59,6 @@ export function useAuth() {
localStorage.removeItem('address');
localStorage.removeItem('isAdmin');
// Перезагружаем страницу
window.location.reload();
return { success: true };
} catch (error) {
console.error('Error disconnecting:', error);
@@ -77,7 +75,6 @@ export function useAuth() {
authType,
userId,
address,
telegramInfo,
isAdmin,
telegramId,
email,