From 4dd3f65835fe76279391c62e8aac59529c7f6936 Mon Sep 17 00:00:00 2001 From: dawn Date: Tue, 18 Aug 2026 01:52:36 +0900 Subject: [PATCH] web/components/shell: fix logged-out topbar showing a permanent loading skeleton Signed-off-by: dawn --- web/src/lib/auth.svelte.ts | 11 ++--- .../components/shell/Topbar.stories.svelte | 4 ++ web/src/lib/components/shell/Topbar.svelte | 44 ++++++++----------- web/src/routes/+layout.svelte | 5 +-- 4 files changed, 29 insertions(+), 35 deletions(-) diff --git a/web/src/lib/auth.svelte.ts b/web/src/lib/auth.svelte.ts index ea64139d..7bb38808 100644 --- a/web/src/lib/auth.svelte.ts +++ b/web/src/lib/auth.svelte.ts @@ -90,8 +90,7 @@ export interface Auth { readonly currentDid: Did | null; readonly profile: AuthProfile | null; readonly error: string | null; - readonly profileLoading: boolean; - readonly authenticating: boolean; + readonly resolving: boolean; readonly currentUser: CurrentUser | null; readonly accounts: AuthAccount[]; hasAccount(did: string): boolean; @@ -473,15 +472,13 @@ export const createAuth = ( get error() { return state.kind === "failed" ? state.message : null; }, - get profileLoading() { + get resolving() { return ( + state.kind === "authenticating" || state.kind === "profile-loading" || - (state.kind === "loading" && state.did !== null && state.profile === null) + (state.kind === "loading" && state.did === null) ); }, - get authenticating() { - return state.kind === "authenticating"; - }, get currentUser() { const did = currentDid(); if (!did) return null; diff --git a/web/src/lib/components/shell/Topbar.stories.svelte b/web/src/lib/components/shell/Topbar.stories.svelte index ba326cba..293657cf 100644 --- a/web/src/lib/components/shell/Topbar.stories.svelte +++ b/web/src/lib/components/shell/Topbar.stories.svelte @@ -23,6 +23,10 @@ + + + +