misc: cleanup profile menu
This commit is contained in:
1 parent
2f9b2be6d0
commit
7a1a98996b
1 file changed
+32
-15
@@ -20,15 +20,19 @@
|
|||||||
MenuDivider,
|
MenuDivider,
|
||||||
Select,
|
Select,
|
||||||
Spinner,
|
Spinner,
|
||||||
|
toast,
|
||||||
} from 'mono-svelte'
|
} from 'mono-svelte'
|
||||||
import {
|
import {
|
||||||
Bars3,
|
Bars3,
|
||||||
Bookmark,
|
Bookmark,
|
||||||
BugAnt,
|
BugAnt,
|
||||||
|
CodeBracket,
|
||||||
|
CodeBracketSquare,
|
||||||
Cog6Tooth,
|
Cog6Tooth,
|
||||||
CommandLine,
|
CommandLine,
|
||||||
ComputerDesktop,
|
ComputerDesktop,
|
||||||
GlobeAlt,
|
GlobeAlt,
|
||||||
|
Heart,
|
||||||
Icon,
|
Icon,
|
||||||
Inbox,
|
Inbox,
|
||||||
InformationCircle,
|
InformationCircle,
|
||||||
@@ -223,9 +227,16 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</button>
|
</button>
|
||||||
<MenuDivider>
|
{#if $profile?.user}
|
||||||
{$profile?.user ? $profile.user.local_user_view.person.name : 'Profile'}
|
<div class="flex flex-row gap-2 items-center py-2 mx-4 font-medium">
|
||||||
</MenuDivider>
|
<Avatar width={22} url={$profile?.user?.local_user_view.person.avatar} alt={$profile?.username} />
|
||||||
|
{$profile?.user?.local_user_view?.person.name}
|
||||||
|
</div>
|
||||||
|
{:else}
|
||||||
|
<MenuDivider>
|
||||||
|
Profile
|
||||||
|
</MenuDivider>
|
||||||
|
{/if}
|
||||||
{#if $profile?.user}
|
{#if $profile?.user}
|
||||||
<MenuButton link href="/profile">
|
<MenuButton link href="/profile">
|
||||||
<Icon src={UserCircle} mini width={16} /> Profile
|
<Icon src={UserCircle} mini width={16} /> Profile
|
||||||
@@ -291,20 +302,26 @@
|
|||||||
{/if}
|
{/if}
|
||||||
<hr class="dark:opacity-10 w-[90%] my-2 mx-auto" />
|
<hr class="dark:opacity-10 w-[90%] my-2 mx-auto" />
|
||||||
<li class="flex flex-col px-4 py-1 mx-auto my-1 text-xs w-full">
|
<li class="flex flex-col px-4 py-1 mx-auto my-1 text-xs w-full">
|
||||||
<div class="flex flex-row gap-2 w-full">
|
<div class="flex flex-row gap-2 w-full items-center">
|
||||||
<!-- svelte-ignore missing-declaration -->
|
<!-- svelte-ignore missing-declaration -->
|
||||||
<span class="mr-auto">v{__VERSION__}</span>
|
<div class="flex-1">
|
||||||
<div class="ml-auto" />
|
<button
|
||||||
<a href="https://buymeacoffee.com/xylight" class="hover:underline">
|
class="hover:brightness-110 transition-all"
|
||||||
Donate
|
on:click={() => {
|
||||||
</a>
|
navigator?.clipboard?.writeText(__VERSION__)
|
||||||
<a href="https://github.com/Xyphyn/photon" class="hover:underline">
|
toast({ content: 'Copied version to clipboard.' })
|
||||||
GitHub
|
}}
|
||||||
</a>
|
>
|
||||||
|
<Badge>{__VERSION__}</Badge>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<Button color="tertiary" href="https://buymeacoffee.com/xylight" title="Donate" size="square-md">
|
||||||
|
<Icon src={Heart} size="16" mini />
|
||||||
|
</Button>
|
||||||
|
<Button color="tertiary" href="https://github.com/Xyphyn/Photon" title="GitHub" size="square-md">
|
||||||
|
<Icon src={CodeBracketSquare} size="16" mini />
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<span class="opacity-70 ml-auto w-max">
|
|
||||||
Made by <Link href="https://xylight.dev">Xylight</Link>
|
|
||||||
</span>
|
|
||||||
</li>
|
</li>
|
||||||
</Menu>
|
</Menu>
|
||||||
</nav>
|
</nav>
|
||||||
Reference in new issue
Block a user