From 8c10ff5574edc6e6f1c3829e903d5cd378f77ccd Mon Sep 17 00:00:00 2001 From: Davide Scaini Date: Sat, 2 May 2026 23:10:28 +0200 Subject: [PATCH] fix card hub not being showed --- hub/index.html | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/hub/index.html b/hub/index.html index 4cea031..2f21541 100644 --- a/hub/index.html +++ b/hub/index.html @@ -52,7 +52,6 @@ font-family: ui-sans-serif, system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; } - body { visibility: hidden; } .wrap { max-width: 384px; @@ -222,12 +221,13 @@ function showApps(user) { loginDiv.style.display = 'none'; - appsDiv.style.display = ''; + appsDiv.style.display = 'block'; greeting.textContent = 'Ciao ' + (user.display_name || user.handle); cardsDiv.innerHTML = ''; - if (user.activity_access) + // activity_access/wiki_access not in CurrentUserResponse yet — default to true + if (user.activity_access !== false) cardsDiv.appendChild(appCard('BincioActivity', 'Tracks, strade e numeri', ACTIVITY_URL)); - if (user.wiki_access) + if (user.wiki_access !== false) cardsDiv.appendChild(appCard('BincioWiki', 'La memoria collettiva del gruppo', WIKI_URL)); } @@ -237,11 +237,8 @@ } fetch('/api/me', { credentials: 'include' }) - .then(async r => { - document.body.style.visibility = ''; - if (r.ok) showApps(await r.json()); - }) - .catch(() => { document.body.style.visibility = ''; }); + .then(async r => { if (r.ok) showApps(await r.json()); }) + .catch(() => {}); form.addEventListener('submit', async e => { e.preventDefault();