feat: allow collapsing accounts
This commit is contained in:
1 parent
8a192de8e1
commit
d05b77a9c7
4 files changed
+19
-8
No files matched your search
@@ -43,7 +43,6 @@
|
|||||||
{index}
|
{index}
|
||||||
{guest}
|
{guest}
|
||||||
selected={$profile?.id == prof.id}
|
selected={$profile?.id == prof.id}
|
||||||
slot="icon"
|
|
||||||
/>
|
/>
|
||||||
<span
|
<span
|
||||||
class="inline-flex flex-col gap-0 {$profile?.id == prof.id
|
class="inline-flex flex-col gap-0 {$profile?.id == prof.id
|
||||||
|
|||||||
@@ -108,14 +108,28 @@
|
|||||||
{/if}
|
{/if}
|
||||||
{#if $profileData.profiles.length >= 1}
|
{#if $profileData.profiles.length >= 1}
|
||||||
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
|
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
|
||||||
|
|
||||||
|
<Expandable
|
||||||
|
class="max-w-full min-w-0 w-full"
|
||||||
|
bind:open={$userSettings.expand.accounts}
|
||||||
|
>
|
||||||
|
<span slot="title" class="px-2 py-1 w-full">
|
||||||
|
<EndPlaceholder>
|
||||||
|
{$t('account.accounts')}
|
||||||
|
<span slot="action" class="dark:text-white text-black">
|
||||||
|
{$profileData.profiles.length}
|
||||||
|
</span>
|
||||||
|
</EndPlaceholder>
|
||||||
|
</span>
|
||||||
{#each [...$profileData.profiles] as prof, index (prof.id)}
|
{#each [...$profileData.profiles] as prof, index (prof.id)}
|
||||||
<div animate:flip={{ duration: 300, easing: expoOut }} class="w-full">
|
<div animate:flip={{ duration: 300, easing: expoOut }} class="w-full">
|
||||||
<ProfileButton {index} {prof} />
|
<ProfileButton {index} {prof} />
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
<SidebarButton href="/accounts" icon={UserGroup}>
|
<SidebarButton href="/accounts" icon={UserGroup}>
|
||||||
<span slot="label">{$t('account.accounts')}</span>
|
{$t('account.accounts')}
|
||||||
</SidebarButton>
|
</SidebarButton>
|
||||||
|
</Expandable>
|
||||||
{/if}
|
{/if}
|
||||||
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
|
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
|
||||||
{#if $profile?.favorites && $profile?.favorites.length > 0}
|
{#if $profile?.favorites && $profile?.favorites.length > 0}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
{href}
|
{href}
|
||||||
on:click
|
on:click
|
||||||
on:contextmenu
|
on:contextmenu
|
||||||
class="font-normal {selected
|
class="font-normal block {selected
|
||||||
? 'text-primary-900 dark:!text-primary-100 bg-slate-100 dark:bg-zinc-800'
|
? 'text-primary-900 dark:!text-primary-100 bg-slate-100 dark:bg-zinc-800'
|
||||||
: 'text-slate-600 dark:text-zinc-400'} {$$props.class}"
|
: 'text-slate-600 dark:text-zinc-400'} {$$props.class}"
|
||||||
>
|
>
|
||||||
@@ -31,11 +31,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</slot>
|
</slot>
|
||||||
<slot />
|
<slot />
|
||||||
<div
|
<div class="contents">
|
||||||
class="{$userSettings.expandSidebar
|
|
||||||
? 'contents'
|
|
||||||
: '//max-lg:hidden'} contents"
|
|
||||||
>
|
|
||||||
<slot name="label" />
|
<slot name="label" />
|
||||||
</div>
|
</div>
|
||||||
</Button>
|
</Button>
|
||||||
@@ -55,6 +55,7 @@ interface Settings {
|
|||||||
about: boolean
|
about: boolean
|
||||||
stats: boolean
|
stats: boolean
|
||||||
team: boolean
|
team: boolean
|
||||||
|
accounts: boolean
|
||||||
}
|
}
|
||||||
displayNames: boolean
|
displayNames: boolean
|
||||||
nsfwBlur: boolean
|
nsfwBlur: boolean
|
||||||
@@ -128,6 +129,7 @@ export const defaultSettings: Settings = {
|
|||||||
about: false,
|
about: false,
|
||||||
stats: false,
|
stats: false,
|
||||||
team: false,
|
team: false,
|
||||||
|
accounts: false,
|
||||||
},
|
},
|
||||||
displayNames: toBool(env.PUBLIC_DISPLAY_NAMES) ?? true,
|
displayNames: toBool(env.PUBLIC_DISPLAY_NAMES) ?? true,
|
||||||
nsfwBlur: toBool(env.PUBLIC_NSFW_BLUR) ?? true,
|
nsfwBlur: toBool(env.PUBLIC_NSFW_BLUR) ?? true,
|
||||||
|
|||||||
Reference in new issue
Block a user