Various fixes and cleanup, regressions from prior commits.

This commit is contained in:
2025-12-04 03:40:59 +00:00
parent 6124fa6c01
commit 9976e05696
10 changed files with 87 additions and 67 deletions
+5 -6
View File
@@ -26,15 +26,14 @@ const showBackMessage = ref(false)
let validationTimer = null
let authIframe = null
async function tryLoadUserInfo() {
async function loadUserInfo() {
try {
await store.loadUserInfo()
store.userInfo = await apiJson('/auth/api/user-info', { method: 'POST' })
authenticated.value = true
loading.value = false
startSessionValidation()
return true
} catch (error) {
// User info load failed - apiJson will show iframe if needed
} catch (e) {
return false
}
}
@@ -74,7 +73,7 @@ function handleAuthMessage(event) {
hideAuthIframe()
loading.value = true
loadingMessage.value = 'Loading user profile...'
tryLoadUserInfo()
loadUserInfo()
break
case 'auth-error':
@@ -150,7 +149,7 @@ onMounted(async () => {
if (store.settings?.rp_name) document.title = store.settings.rp_name
// Try to load user info
const success = await tryLoadUserInfo()
const success = await loadUserInfo()
if (!success) {
// Need authentication - show login iframe