fix: hide redundant information in accounts selector for linked instances

This commit is contained in:
Xylight committed 2025-10-15 21:40:13 -07:00
1 parent 0bb99ddb86
commit ad9236f43b
4 files changed
+37 -22

No files matched your search

+9 -1
View File
@@ -2,6 +2,7 @@
import { env } from '$env/dynamic/public'
import { notifications, profile } from '$lib/app/auth.svelte'
import { t } from '$lib/app/i18n'
import { LINKED_INSTANCE_URL } from '$lib/app/instance.svelte'
import { settings } from '$lib/app/settings.svelte'
import { theme } from '$lib/app/theme/theme.svelte'
import { communityLink } from '$lib/app/util.svelte'
@@ -41,7 +42,14 @@
class={['flex flex-col overflow-auto gap-1', clazz]}
{style}
>
<ProfileSelection profiles={profile.meta.profiles} />
<ProfileSelection
selectable={!(
LINKED_INSTANCE_URL &&
!profile.current.jwt &&
profile.meta.profiles.length == 1
)}
profiles={profile.meta.profiles}
/>
<EndPlaceholder margin="sm" size="xs">{$t('profile.profile')}</EndPlaceholder>
{#if profile.current?.jwt}
<SidebarButton