maintainance
All checks were successful
Deploy on push / deploy (push) Successful in 6m5s

This commit is contained in:
2025-10-03 13:58:52 +03:00
parent 91a3189167
commit 6faf75c229
6 changed files with 290 additions and 276 deletions

View File

@@ -69,7 +69,7 @@ export const AuthProvider: Component<AuthProviderProps> = (props) => {
// Начинаем с false чтобы избежать мерцания, реальная проверка будет в onMount
const [isAuthenticated, setIsAuthenticated] = createSignal(false)
const [isReady, setIsReady] = createSignal(false)
// Флаг для предотвращения повторных инициализаций
let isInitializing = false
@@ -82,7 +82,7 @@ export const AuthProvider: Component<AuthProviderProps> = (props) => {
console.log('[AuthProvider] Already initializing, skipping...')
return
}
isInitializing = true
console.log('[AuthProvider] Performing auth initialization...')
@@ -91,7 +91,7 @@ export const AuthProvider: Component<AuthProviderProps> = (props) => {
console.log('[AuthProvider] Checking authentication via GraphQL...')
// Добавляем таймаут для запроса (5 секунд для лучшего UX)
const timeoutPromise = new Promise((_, reject) =>
const timeoutPromise = new Promise((_, reject) =>
setTimeout(() => reject(new Error('Auth check timeout')), 5000)
)
@@ -159,10 +159,10 @@ export const AuthProvider: Component<AuthProviderProps> = (props) => {
const logout = async () => {
console.log('[AuthProvider] Attempting logout...')
// Предотвращаем повторные инициализации во время logout
isInitializing = true
try {
// Сначала очищаем токены на клиенте
clearAuthTokens()

View File

@@ -1,6 +1,6 @@
import { Component, createSignal, For, Show } from 'solid-js'
import { query } from '../graphql'
import type { EnvSection, EnvVariable, Query } from '../graphql/generated/schema'
import type { EnvSection, EnvVariable, Query } from '../graphql/generated/graphql'
import { ADMIN_UPDATE_ENV_VARIABLE_MUTATION } from '../graphql/mutations'
import { ADMIN_GET_ENV_VARIABLES_QUERY } from '../graphql/queries'
import EnvVariableModal from '../modals/EnvVariableModal'