fix: remove sidebar stuff
This commit is contained in:
1 parent
a0ce677abc
commit
e4a8718ba4
4 files changed
+15
-48
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "photon-lemmy",
|
||||
"version": "1.16.3",
|
||||
"version": "1.16.4",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
import { slide } from 'svelte/transition'
|
||||
|
||||
export let items: Community[]
|
||||
export let expanded: boolean
|
||||
</script>
|
||||
|
||||
{#each items.sort( (a, b) => a.title.localeCompare(b.title) ) as follow (follow.id)}
|
||||
@@ -16,7 +15,7 @@
|
||||
animate:flip={{ duration: 500, easing: expoOut }}
|
||||
>
|
||||
<Button
|
||||
class="font-normal w-full h-max {expanded ? '' : '!p-1.5'}"
|
||||
class="font-normal w-full h-max"
|
||||
color="tertiary"
|
||||
alignment="left"
|
||||
href="/c/{follow.name}@{new URL(follow.actor_id).hostname}"
|
||||
@@ -30,10 +29,7 @@
|
||||
slot="prefix"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
class="flex flex-col max-w-full break-words"
|
||||
class:hidden={!expanded}
|
||||
>
|
||||
<div class="flex flex-col max-w-full break-words">
|
||||
<span>{follow.title}</span>
|
||||
<span class="text-xs text-slate-600 dark:text-zinc-400">
|
||||
{new URL(follow.actor_id).hostname}
|
||||
|
||||
@@ -23,33 +23,14 @@
|
||||
|
||||
<nav
|
||||
class="flex flex-col pl-4 pr-4 py-4 overflow-auto
|
||||
gap-1 max-h-[calc(100svh-4rem)]
|
||||
{$userSettings.expandSidebar
|
||||
? ''
|
||||
: 'w-max max-w-max min-w-max'} {$$props.class}"
|
||||
gap-1 max-h-[calc(100svh-4rem)] {$$props.class}"
|
||||
style={$$props.style}
|
||||
>
|
||||
<!-- <Button
|
||||
on:click={() =>
|
||||
($userSettings.expandSidebar = !$userSettings.expandSidebar)}
|
||||
class="w-max !p-2"
|
||||
aria-label="Collapse sidebar"
|
||||
>
|
||||
<Icon
|
||||
src={ChevronDoubleLeft}
|
||||
mini
|
||||
size="16"
|
||||
class="transition-transform {$userSettings.expandSidebar
|
||||
? ''
|
||||
: 'rotate-180'}"
|
||||
title="Toggle Sidebar"
|
||||
/>
|
||||
</Button> -->
|
||||
<SidebarButton href="/" expanded={$userSettings.expandSidebar}>
|
||||
<SidebarButton href="/">
|
||||
<Icon src={Home} mini={route == '/'} size="20" title="Frontpage" />
|
||||
<span>Frontpage</span>
|
||||
</SidebarButton>
|
||||
<SidebarButton href="/settings" expanded={$userSettings.expandSidebar}>
|
||||
<SidebarButton href="/settings">
|
||||
<Icon
|
||||
src={Cog6Tooth}
|
||||
mini={route == '/settings'}
|
||||
@@ -58,7 +39,7 @@
|
||||
/>
|
||||
<span>Settings</span>
|
||||
</SidebarButton>
|
||||
<SidebarButton expanded={$userSettings.expandSidebar} href="/communities">
|
||||
<SidebarButton href="/communities">
|
||||
<Icon mini={route == '/communities'} src={GlobeAlt} size="20" />
|
||||
<span>Communities</span>
|
||||
</SidebarButton>
|
||||
@@ -66,10 +47,10 @@
|
||||
<hr class="border-slate-300 dark:border-zinc-800 my-1" />
|
||||
{#each $profileData.profiles as prof, index (prof.id)}
|
||||
<div animate:flip={{ duration: 300, easing: expoOut }} class="w-full">
|
||||
<ProfileButton {index} {prof} expanded={$userSettings.expandSidebar} />
|
||||
<ProfileButton {index} {prof} />
|
||||
</div>
|
||||
{/each}
|
||||
<SidebarButton href="/accounts" expanded={$userSettings.expandSidebar}>
|
||||
<SidebarButton href="/accounts">
|
||||
<Icon src={UserGroup} mini size="20" />
|
||||
<span>Accounts</span>
|
||||
</SidebarButton>
|
||||
@@ -77,20 +58,14 @@
|
||||
<hr class="border-slate-300 dark:border-zinc-800 my-1" />
|
||||
{#if $profile?.user}
|
||||
{#if $profile?.user.moderates.length > 0}
|
||||
<CommunityList
|
||||
expanded={$userSettings.expandSidebar}
|
||||
items={$profile.user.moderates.map((i) => i.community)}
|
||||
/>
|
||||
<CommunityList items={$profile.user.moderates.map((i) => i.community)} />
|
||||
<hr class="border-slate-300 dark:border-zinc-800 my-1" />
|
||||
{/if}
|
||||
|
||||
<CommunityList
|
||||
expanded={$userSettings.expandSidebar}
|
||||
items={$profile.user.follows.map((i) => i.community)}
|
||||
/>
|
||||
<CommunityList items={$profile.user.follows.map((i) => i.community)} />
|
||||
{:else}
|
||||
<Button
|
||||
class="hover:bg-slate-200 {$userSettings.expandSidebar ? '' : '!p-1.5'}"
|
||||
class="hover:bg-slate-200"
|
||||
href="/login"
|
||||
color="tertiary"
|
||||
alignment="left"
|
||||
@@ -100,7 +75,7 @@
|
||||
<span>Log In</span>
|
||||
</Button>
|
||||
<Button
|
||||
class="hover:bg-slate-200 {$userSettings.expandSidebar ? '' : '!p-1.5'}"
|
||||
class="hover:bg-slate-200"
|
||||
href="/signup"
|
||||
color="tertiary"
|
||||
alignment="left"
|
||||
@@ -110,7 +85,7 @@
|
||||
<span>Sign Up</span>
|
||||
</Button>
|
||||
<Button
|
||||
class="hover:bg-slate-200 {$userSettings.expandSidebar ? '' : '!p-1.5'}"
|
||||
class="hover:bg-slate-200"
|
||||
href="/accounts"
|
||||
color="tertiary"
|
||||
alignment="left"
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { Button } from 'mono-svelte'
|
||||
|
||||
export let expanded: boolean
|
||||
</script>
|
||||
|
||||
<Button
|
||||
@@ -9,9 +7,7 @@
|
||||
color="tertiary"
|
||||
alignment="left"
|
||||
on:click
|
||||
class="hover:bg-slate-100 font-normal {expanded
|
||||
? ''
|
||||
: '!p-1.5'} {$$props.class}"
|
||||
class="hover:bg-slate-100 font-normal {$$props.class}"
|
||||
>
|
||||
<slot />
|
||||
</Button>
|
||||
Reference in new issue
Block a user