design: re-do menus, dynamic origin animations

This commit is contained in:
James Xylight committed 2025-08-22 15:35:53 -07:00
1 parent 148436d3b8
commit 0805313852
14 files changed
+91 -74

No files matched your search

@@ -40,8 +40,10 @@
</script>
<div
class="flex flex-row items-center gap-0.5 h-7 w-full"
class:flex-row-reverse={settings.posts.reverseActions}
class={[
'flex flex-row items-center gap-0.5 h-7 w-full',
settings.posts.reverseActions && 'flex-row-reverse',
]}
>
<CommentVote
upvotes={comment.counts.upvotes}
@@ -50,15 +52,15 @@
commentId={comment.comment.id}
/>
<Button
size="sm"
color="tertiary"
rounding="pill"
class="text-slate-600 dark:text-zinc-400"
size="sm"
class="text-slate-500 dark:text-zinc-400"
onclick={() => (replying = !replying)}
disabled={comment.post.locked || disabled}
>
<Icon src={ChatBubbleOvalLeft} size="14" micro />
<span class="text-xs">{$t('comment.reply')}</span>
<Icon src={ChatBubbleOvalLeft} size="15" micro />
{$t('comment.reply')}
</Button>
{#if profile.current?.user && (amMod(profile.current?.user, comment.community) || isAdmin(profile.current.user))}
<CommentModerationMenu bind:item={comment} />
@@ -190,7 +190,7 @@
{:else}
<VirtualList
id="feed"
class="divide-y -mx-3 sm:-mx-6 divide-slate-200 dark:divide-zinc-900"
class="divide-y-2 -mx-3 sm:-mx-6 divide-slate-200 dark:divide-zinc-900"
items={posts}
{initialOffset}
overscan={3}
+6 -2
View File
@@ -197,7 +197,7 @@
</span>
{/if}
</Menu>
<Menu>
<Menu placement="bottom">
{#snippet target()}
<button
class="w-10 h-10 rounded-full border-slate-200 dark:border-zinc-700
@@ -224,7 +224,11 @@
{/snippet}
{#snippet children(open)}
{#if open}
{#await import('./Profile.svelte') then { default: Profile }}
{#await import('./Profile.svelte')}
<div class="m-8 w-full h-full grid place-items-center">
<Spinner width={20} />
</div>
{:then { default: Profile }}
<Profile />
{/await}
{/if}