| ... | ... | @@ -223,12 +223,11 @@ export function viewAs(groups: string[] | null) { |
| 223 | 223 | location.reload(); |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | | /** The signed-in user's corner. */ |
| 227 | 226 | function Whoami(props: { me: Me }) { |
| 228 | 227 | const user = lastGood(account); |
| 229 | 228 | const name = () => { |
| 230 | 229 | const known = user(); |
| 231 | | return known ? displayName(known) : props.me.name; |
| 230 | return known ? displayName(known) : account.error ? props.me.name : ""; |
| 232 | 231 | }; |
| 233 | 232 | const here = useMatch(() => "/account"); |
| 234 | 233 | const [picked, setPicked] = createSignal(props.me.viewing ? props.me.groups : []); |
| ... | ... | @@ -237,7 +236,7 @@ function Whoami(props: { me: Me }) { |
| 237 | 236 | <div class="whoami"> |
| 238 | 237 | <button class="whoami-button" classList={{ active: !!here() }} popovertarget="account-menu"> |
| 239 | 238 | <Avatar picture={user()?.picture ?? null} name={name()} /> |
| 240 | | <span class="name"><Show when={user()} fallback={account.error ? props.me.name : <span class="skeleton" style={{ width: "100px" }} />}> |
| 239 | <span class="name"><Show when={user()} fallback={account.error ? name() : <span class="skeleton" style={{ width: "100px" }} />}> |
| 241 | 240 | {(profile) => displayName(profile())} |
| 242 | 241 | </Show></span> |
| 243 | 242 | <ChevronsUpDown size={14} class="icon" /> |