impr: switch menus to attachment based vs cursed div wrapper

This commit is contained in:
James Xylight committed 2025-08-28 21:18:43 -07:00
1 parent 078fdc2c71
commit 2891c68494
20 files changed
+93 -93

No files matched your search

@@ -19,10 +19,11 @@
Trash,
} from 'svelte-hero-icons'
import { amMod, ban, isAdmin, remove, viewVotes } from './moderation'
import type { Attachment } from 'svelte/attachments'
interface Props {
item: PostView | CommentView
target: Snippet<[boolean]>
target: Snippet<[Attachment, boolean]>
}
let { item = $bindable(), target: passedTarget }: Props = $props()
@@ -75,8 +76,8 @@
</script>
<Menu placement="bottom-end">
{#snippet target()}
{@render passedTarget(acting)}
{#snippet target(attachment)}
{@render passedTarget(attachment, acting)}
{/snippet}
{#if (profile.current?.user && amMod(profile.current.user, item.community)) || (profile.current?.user && isAdmin(profile.current.user))}
<MenuDivider showLabel>