impr: switch menus to attachment based vs cursed div wrapper
This commit is contained in:
20 files changed
+86
-86
No files matched your search
@@ -66,8 +66,9 @@
|
|||||||
<CommentModerationMenu bind:item={comment} />
|
<CommentModerationMenu bind:item={comment} />
|
||||||
{/if}
|
{/if}
|
||||||
<Menu placement="bottom">
|
<Menu placement="bottom">
|
||||||
{#snippet target()}
|
{#snippet target(attachment)}
|
||||||
<Button
|
<Button
|
||||||
|
{@attach attachment}
|
||||||
title={$t('comment.actions.label')}
|
title={$t('comment.actions.label')}
|
||||||
color="tertiary"
|
color="tertiary"
|
||||||
rounding="pill"
|
rounding="pill"
|
||||||
|
|||||||
@@ -270,8 +270,8 @@
|
|||||||
</Button>
|
</Button>
|
||||||
{/if}
|
{/if}
|
||||||
<Menu placement="top-end">
|
<Menu placement="top-end">
|
||||||
{#snippet target()}
|
{#snippet target(attachment)}
|
||||||
<Button size="square-md" rounding="pill">
|
<Button {@attach attachment} size="square-md" rounding="pill">
|
||||||
{#snippet prefix()}
|
{#snippet prefix()}
|
||||||
<Icon src={EllipsisHorizontal} size="16" mini />
|
<Icon src={EllipsisHorizontal} size="16" mini />
|
||||||
{/snippet}
|
{/snippet}
|
||||||
|
|||||||
@@ -193,8 +193,8 @@
|
|||||||
{#if site.data}
|
{#if site.data}
|
||||||
<div class="flex gap-2 flex-wrap flex-row">
|
<div class="flex gap-2 flex-wrap flex-row">
|
||||||
<Menu class="gap-px">
|
<Menu class="gap-px">
|
||||||
{#snippet target()}
|
{#snippet target(attachment)}
|
||||||
<button type="button">
|
<button {@attach attachment} type="button">
|
||||||
<Badge color="blue-subtle">
|
<Badge color="blue-subtle">
|
||||||
<Icon src={Plus} micro size="14" />
|
<Icon src={Plus} micro size="14" />
|
||||||
{$t('common.add')}
|
{$t('common.add')}
|
||||||
|
|||||||
@@ -170,8 +170,8 @@
|
|||||||
</Button>
|
</Button>
|
||||||
{/if}
|
{/if}
|
||||||
<Menu placement="top-end">
|
<Menu placement="top-end">
|
||||||
{#snippet target()}
|
{#snippet target(attachment)}
|
||||||
<Button size="custom" rounding="pill" class="h-8.5 aspect-square">
|
<Button {@attach attachment} size="custom" rounding="pill" class="h-8.5 aspect-square">
|
||||||
{#snippet prefix()}
|
{#snippet prefix()}
|
||||||
<Icon src={EllipsisHorizontal} size="16" mini />
|
<Icon src={EllipsisHorizontal} size="16" mini />
|
||||||
{/snippet}
|
{/snippet}
|
||||||
|
|||||||
@@ -24,8 +24,9 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Menu placement="bottom" class="top-0 h-[26px] w-[26px] ">
|
<Menu placement="bottom" class="top-0 h-[26px] w-[26px] ">
|
||||||
{#snippet target()}
|
{#snippet target(attachment)}
|
||||||
<Button
|
<Button
|
||||||
|
{@attach attachment}
|
||||||
class="w-[26px] h-[26px] hover:text-green-500! dark:text-zinc-400 text-slate-600"
|
class="w-[26px] h-[26px] hover:text-green-500! dark:text-zinc-400 text-slate-600"
|
||||||
size="square-md"
|
size="square-md"
|
||||||
color="tertiary"
|
color="tertiary"
|
||||||
|
|||||||
@@ -19,10 +19,11 @@
|
|||||||
Trash,
|
Trash,
|
||||||
} from 'svelte-hero-icons'
|
} from 'svelte-hero-icons'
|
||||||
import { amMod, ban, isAdmin, remove, viewVotes } from './moderation'
|
import { amMod, ban, isAdmin, remove, viewVotes } from './moderation'
|
||||||
|
import type { Attachment } from 'svelte/attachments'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
item: PostView | CommentView
|
item: PostView | CommentView
|
||||||
target: Snippet<[boolean]>
|
target: Snippet<[Attachment, boolean]>
|
||||||
}
|
}
|
||||||
|
|
||||||
let { item = $bindable(), target: passedTarget }: Props = $props()
|
let { item = $bindable(), target: passedTarget }: Props = $props()
|
||||||
@@ -75,8 +76,8 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Menu placement="bottom-end">
|
<Menu placement="bottom-end">
|
||||||
{#snippet target()}
|
{#snippet target(attachment)}
|
||||||
{@render passedTarget(acting)}
|
{@render passedTarget(attachment, acting)}
|
||||||
{/snippet}
|
{/snippet}
|
||||||
{#if (profile.current?.user && amMod(profile.current.user, item.community)) || (profile.current?.user && isAdmin(profile.current.user))}
|
{#if (profile.current?.user && amMod(profile.current.user, item.community)) || (profile.current?.user && isAdmin(profile.current.user))}
|
||||||
<MenuDivider showLabel>
|
<MenuDivider showLabel>
|
||||||
|
|||||||
@@ -134,8 +134,9 @@
|
|||||||
{#if profile.current?.user && (amMod(profile.current.user, post.community) || isAdmin(profile.current.user))}
|
{#if profile.current?.user && (amMod(profile.current.user, post.community) || isAdmin(profile.current.user))}
|
||||||
{#await import('$lib/components/lemmy/moderation/ModerationMenu.svelte') then { default: ModerationMenu }}
|
{#await import('$lib/components/lemmy/moderation/ModerationMenu.svelte') then { default: ModerationMenu }}
|
||||||
<ModerationMenu bind:item={post}>
|
<ModerationMenu bind:item={post}>
|
||||||
{#snippet target(acting)}
|
{#snippet target(attachment, acting)}
|
||||||
<Button
|
<Button
|
||||||
|
{@attach attachment}
|
||||||
size="custom"
|
size="custom"
|
||||||
color="secondary"
|
color="secondary"
|
||||||
rounding="pill"
|
rounding="pill"
|
||||||
@@ -172,8 +173,9 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<Menu placement="bottom-end">
|
<Menu placement="bottom-end">
|
||||||
{#snippet target()}
|
{#snippet target(popover)}
|
||||||
<Button
|
<Button
|
||||||
|
{@attach popover}
|
||||||
title={$t('post.actions.more.label')}
|
title={$t('post.actions.more.label')}
|
||||||
color="secondary"
|
color="secondary"
|
||||||
rounding="pill"
|
rounding="pill"
|
||||||
|
|||||||
@@ -105,8 +105,9 @@
|
|||||||
href="/create"
|
href="/create"
|
||||||
/>
|
/>
|
||||||
<Menu placement="bottom">
|
<Menu placement="bottom">
|
||||||
{#snippet target()}
|
{#snippet target(attachment)}
|
||||||
<button
|
<button
|
||||||
|
{@attach attachment}
|
||||||
class="w-10 h-10 rounded-full border-slate-200 dark:border-zinc-700
|
class="w-10 h-10 rounded-full border-slate-200 dark:border-zinc-700
|
||||||
transition-all bg-slate-50 dark:bg-zinc-900 relative
|
transition-all bg-slate-50 dark:bg-zinc-900 relative
|
||||||
hover:bg-slate-200 dark:hover:bg-zinc-700 group cursor-pointer"
|
hover:bg-slate-200 dark:hover:bg-zinc-700 group cursor-pointer"
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
MenuButton,
|
MenuButton,
|
||||||
MenuDivider,
|
MenuDivider,
|
||||||
modal,
|
modal,
|
||||||
Modal,
|
|
||||||
Option,
|
Option,
|
||||||
Select,
|
Select,
|
||||||
Spinner,
|
Spinner,
|
||||||
@@ -41,8 +40,6 @@
|
|||||||
UserCircle,
|
UserCircle,
|
||||||
UserGroup,
|
UserGroup,
|
||||||
} from 'svelte-hero-icons'
|
} from 'svelte-hero-icons'
|
||||||
|
|
||||||
let showInstance = $state(false)
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#snippet siteSnippet()}
|
{#snippet siteSnippet()}
|
||||||
@@ -140,8 +137,9 @@
|
|||||||
<!--svelte-ignore a11y_no_static_element_interactions-->
|
<!--svelte-ignore a11y_no_static_element_interactions-->
|
||||||
<div onclick={e => e.stopPropagation()}>
|
<div onclick={e => e.stopPropagation()}>
|
||||||
<Select bind:value={theme.colorScheme} size="sm">
|
<Select bind:value={theme.colorScheme} size="sm">
|
||||||
{#snippet target()}
|
{#snippet target(attachment)}
|
||||||
<MenuButton
|
<MenuButton
|
||||||
|
{@attach attachment}
|
||||||
icon={theme.colorScheme == 'system'
|
icon={theme.colorScheme == 'system'
|
||||||
? ComputerDesktop
|
? ComputerDesktop
|
||||||
: theme.colorScheme == 'light'
|
: theme.colorScheme == 'light'
|
||||||
|
|||||||
@@ -25,8 +25,9 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Menu placement="bottom">
|
<Menu placement="bottom">
|
||||||
{#snippet target()}
|
{#snippet target(attachment)}
|
||||||
<Button
|
<Button
|
||||||
|
{@attach attachment}
|
||||||
color="tertiary"
|
color="tertiary"
|
||||||
alignment="left"
|
alignment="left"
|
||||||
size="md"
|
size="md"
|
||||||
|
|||||||
@@ -83,8 +83,9 @@
|
|||||||
icon={Cog6Tooth}
|
icon={Cog6Tooth}
|
||||||
/>
|
/>
|
||||||
<Select bind:value={theme.colorScheme} size="sm">
|
<Select bind:value={theme.colorScheme} size="sm">
|
||||||
{#snippet target()}
|
{#snippet target(attachment)}
|
||||||
<SidebarButton
|
<SidebarButton
|
||||||
|
{@attach attachment}
|
||||||
label={$t('nav.menu.colorscheme.label')}
|
label={$t('nav.menu.colorscheme.label')}
|
||||||
icon={theme.colorScheme == 'system'
|
icon={theme.colorScheme == 'system'
|
||||||
? ComputerDesktop
|
? ComputerDesktop
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
>
|
>
|
||||||
target?: Snippet
|
target?: Snippet<[Attachment]>
|
||||||
oncontextmenu?: HTMLSelectAttributes['oncontextmenu']
|
oncontextmenu?: HTMLSelectAttributes['oncontextmenu']
|
||||||
onchange?: HTMLSelectAttributes['onchange']
|
onchange?: HTMLSelectAttributes['onchange']
|
||||||
placement?: Placement
|
placement?: Placement
|
||||||
@@ -54,6 +54,7 @@
|
|||||||
import Label from '../Label.svelte'
|
import Label from '../Label.svelte'
|
||||||
import { generateID } from '../helper.js'
|
import { generateID } from '../helper.js'
|
||||||
import type { Placement } from 'svelte-floating-ui/core'
|
import type { Placement } from 'svelte-floating-ui/core'
|
||||||
|
import type { Attachment } from 'svelte/attachments'
|
||||||
|
|
||||||
let open = $state(false)
|
let open = $state(false)
|
||||||
let element: HTMLSelectElement | undefined = $state()
|
let element: HTMLSelectElement | undefined = $state()
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
type Strategy,
|
type Strategy,
|
||||||
} from '@floating-ui/core'
|
} from '@floating-ui/core'
|
||||||
import Popover from '../popover/Popover.svelte'
|
import Popover from '../popover/Popover.svelte'
|
||||||
|
import type { Snippet } from 'svelte'
|
||||||
|
import type { Attachment } from 'svelte/attachments'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
openOnHover?: boolean
|
openOnHover?: boolean
|
||||||
@@ -17,7 +19,7 @@
|
|||||||
middleware?: Middleware[]
|
middleware?: Middleware[]
|
||||||
strategy?: Strategy
|
strategy?: Strategy
|
||||||
class?: string
|
class?: string
|
||||||
target?: import('svelte').Snippet
|
target?: Snippet<[Attachment]>
|
||||||
children?: import('svelte').Snippet<[boolean]>
|
children?: import('svelte').Snippet<[boolean]>
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,11 +43,11 @@
|
|||||||
{middleware}
|
{middleware}
|
||||||
{strategy}
|
{strategy}
|
||||||
{manual}
|
{manual}
|
||||||
|
{target}
|
||||||
{...rest}
|
{...rest}
|
||||||
bind:open
|
bind:open
|
||||||
popoverClass="rounded-xl w-full backdrop-blur-md max-w-72"
|
popoverClass="rounded-xl w-full backdrop-blur-md max-w-72"
|
||||||
class={clazz}
|
class={clazz}
|
||||||
{target}
|
|
||||||
>
|
>
|
||||||
{#snippet popover()}
|
{#snippet popover()}
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
} from '@floating-ui/core'
|
} from '@floating-ui/core'
|
||||||
import { createFloatingActions } from 'svelte-floating-ui'
|
import { createFloatingActions } from 'svelte-floating-ui'
|
||||||
import { focusTrap } from 'svelte-focus-trap'
|
import { focusTrap } from 'svelte-focus-trap'
|
||||||
|
import type { Attachment } from 'svelte/attachments'
|
||||||
import { expoOut } from 'svelte/easing'
|
import { expoOut } from 'svelte/easing'
|
||||||
import { scale } from 'svelte/transition'
|
import { scale } from 'svelte/transition'
|
||||||
import { Material } from '../index'
|
import { Material } from '../index'
|
||||||
@@ -24,7 +25,7 @@
|
|||||||
manual?: boolean
|
manual?: boolean
|
||||||
popoverClass?: string
|
popoverClass?: string
|
||||||
class?: string
|
class?: string
|
||||||
target?: import('svelte').Snippet
|
target?: import('svelte').Snippet<[Attachment]>
|
||||||
popover?: import('svelte').Snippet<[boolean]>
|
popover?: import('svelte').Snippet<[boolean]>
|
||||||
children?: import('svelte').Snippet<[boolean]>
|
children?: import('svelte').Snippet<[boolean]>
|
||||||
}
|
}
|
||||||
@@ -36,17 +37,12 @@
|
|||||||
placement = 'bottom-start',
|
placement = 'bottom-start',
|
||||||
middleware = [offset(6), shift(), flip()],
|
middleware = [offset(6), shift(), flip()],
|
||||||
strategy = 'fixed',
|
strategy = 'fixed',
|
||||||
manual = false,
|
|
||||||
popoverClass = '',
|
popoverClass = '',
|
||||||
class: clazz = '',
|
|
||||||
target,
|
target,
|
||||||
popover,
|
popover,
|
||||||
children,
|
children,
|
||||||
}: Props = $props()
|
}: Props = $props()
|
||||||
|
|
||||||
let canUseContents = $state(true)
|
|
||||||
|
|
||||||
let el = $state<HTMLElement>()
|
|
||||||
let popoverEl = $state<HTMLElement>()
|
let popoverEl = $state<HTMLElement>()
|
||||||
|
|
||||||
let origins: Record<Placement, string> = {
|
let origins: Record<Placement, string> = {
|
||||||
@@ -75,66 +71,58 @@
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const customFloatingContent = (node: HTMLDivElement) => {
|
const menuAttach: Attachment = element => {
|
||||||
floatingContent(node)
|
console.log(element)
|
||||||
}
|
const e = element as HTMLButtonElement
|
||||||
|
|
||||||
const customFloatingRef = (node: HTMLDivElement) => {
|
const mouseLeave = () => (openOnHover ? (open = false) : false)
|
||||||
const n = node.children.item(0)
|
const focus = () => (openOnHover ? (open = true) : false)
|
||||||
|
const focusout = () => (openOnHover ? (open = false) : false)
|
||||||
|
const click = () => {
|
||||||
|
open = !open
|
||||||
|
|
||||||
// @ts-expect-error svelte hell
|
if (autoClose) {
|
||||||
if (n) floatingRef(n)
|
const clickHandler = (event: Event) => {
|
||||||
else {
|
if (!e) return
|
||||||
canUseContents = false
|
|
||||||
floatingRef(node)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<svelte:body
|
if (!e?.contains(event.target as Node | null)) {
|
||||||
onclick={e => {
|
|
||||||
if (openOnHover) return
|
|
||||||
|
|
||||||
// @ts-expect-error svelte hell
|
|
||||||
if (!el?.contains(e.target) && open) {
|
|
||||||
if (!autoClose) {
|
if (!autoClose) {
|
||||||
// @ts-expect-error svelte hell
|
// @ts-expect-error svelte hell
|
||||||
if (popoverEl && !popoverEl.contains(e.target)) {
|
if (popoverEl && !popoverEl.contains(event.target)) {
|
||||||
open = false
|
open = false
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
open = false
|
open = false
|
||||||
}
|
}
|
||||||
|
document.removeEventListener('click', clickHandler)
|
||||||
}
|
}
|
||||||
}}
|
|
||||||
onkeydown={async e => {
|
|
||||||
if (open && e.key == 'Escape') {
|
|
||||||
open = false
|
|
||||||
// @ts-expect-error svelte hell
|
|
||||||
el?.firstChild.focus()
|
|
||||||
}
|
}
|
||||||
}}
|
document.addEventListener('click', clickHandler)
|
||||||
/>
|
}
|
||||||
|
}
|
||||||
|
const keydown = (event: KeyboardEvent) => {
|
||||||
|
if (event.key === 'Escape') open = false
|
||||||
|
}
|
||||||
|
|
||||||
{#if target}
|
e.addEventListener('mouseleave', mouseLeave)
|
||||||
<div
|
e.addEventListener('focus', focus)
|
||||||
onmouseover={() => (openOnHover ? (open = true) : false)}
|
e.addEventListener('focusout', focusout)
|
||||||
onmouseleave={() => (openOnHover ? (open = false) : false)}
|
e.addEventListener('click', click)
|
||||||
onfocus={() => (openOnHover ? (open = true) : false)}
|
e.addEventListener('keydown', keydown)
|
||||||
onfocusout={() => (openOnHover ? (open = false) : false)}
|
|
||||||
onclick={() => (!openOnHover && !manual ? (open = !open) : false)}
|
floatingRef(e)
|
||||||
onkeydown={e => {
|
|
||||||
if (e.key == 'Escape') open = false
|
return () => {
|
||||||
}}
|
e.removeEventListener('mouseleave', mouseLeave)
|
||||||
tabindex="0"
|
e.removeEventListener('focus', focus)
|
||||||
role="button"
|
e.removeEventListener('focusout', focusout)
|
||||||
class="{canUseContents ? 'contents text-left' : 'w-max h-max'} {clazz}"
|
e.removeEventListener('click', click)
|
||||||
bind:this={el}
|
e.removeEventListener('keydown', keydown)
|
||||||
use:customFloatingRef
|
}
|
||||||
>
|
}
|
||||||
{@render target?.()}
|
</script>
|
||||||
</div>
|
|
||||||
{/if}
|
{@render target?.(menuAttach)}
|
||||||
|
|
||||||
{#if open}
|
{#if open}
|
||||||
<Portal class="z-150">
|
<Portal class="z-150">
|
||||||
@@ -146,7 +134,7 @@
|
|||||||
easing: expoOut,
|
easing: expoOut,
|
||||||
}}
|
}}
|
||||||
class="z-150 {popoverClass}"
|
class="z-150 {popoverClass}"
|
||||||
use:customFloatingContent
|
use:floatingContent
|
||||||
use:focusTrap
|
use:focusTrap
|
||||||
bind:this={popoverEl}
|
bind:this={popoverEl}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -65,9 +65,10 @@
|
|||||||
|
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<Menu bind:open={openMenu}>
|
<Menu bind:open={openMenu}>
|
||||||
{#snippet target()}
|
{#snippet target(attachment)}
|
||||||
{#if input}{@render input()}{:else}
|
{#if input}{@render input()}{:else}
|
||||||
<TextInput
|
<TextInput
|
||||||
|
{@attach attachment}
|
||||||
bind:value={query}
|
bind:value={query}
|
||||||
oninput={e => {
|
oninput={e => {
|
||||||
searching = true
|
searching = true
|
||||||
|
|||||||
@@ -171,8 +171,9 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<Menu placement="bottom-end">
|
<Menu placement="bottom-end">
|
||||||
{#snippet target()}
|
{#snippet target(attachment)}
|
||||||
<Button
|
<Button
|
||||||
|
{@attach attachment}
|
||||||
size="square-md"
|
size="square-md"
|
||||||
color="tertiary"
|
color="tertiary"
|
||||||
class="justify-self-end ml-auto z-50"
|
class="justify-self-end ml-auto z-50"
|
||||||
|
|||||||
@@ -188,8 +188,8 @@
|
|||||||
{#if site.data}
|
{#if site.data}
|
||||||
<div class="flex gap-2 flex-wrap flex-row">
|
<div class="flex gap-2 flex-wrap flex-row">
|
||||||
<Menu class="gap-px">
|
<Menu class="gap-px">
|
||||||
{#snippet target()}
|
{#snippet target(attachment)}
|
||||||
<button type="button">
|
<button {@attach attachment} type="button">
|
||||||
<Badge color="blue-subtle">
|
<Badge color="blue-subtle">
|
||||||
<Icon src={Plus} micro size="14" />
|
<Icon src={Plus} micro size="14" />
|
||||||
{$t('common.add')}
|
{$t('common.add')}
|
||||||
|
|||||||
@@ -120,8 +120,8 @@
|
|||||||
{#if site.data && formData.discussion_languages}
|
{#if site.data && formData.discussion_languages}
|
||||||
<div class="flex gap-2 flex-wrap flex-row">
|
<div class="flex gap-2 flex-wrap flex-row">
|
||||||
<Menu class="gap-px">
|
<Menu class="gap-px">
|
||||||
{#snippet target()}
|
{#snippet target(attachment)}
|
||||||
<button type="button">
|
<button {@attach attachment} type="button">
|
||||||
<Badge color="blue-subtle">
|
<Badge color="blue-subtle">
|
||||||
<Icon src={Plus} micro size="14" />
|
<Icon src={Plus} micro size="14" />
|
||||||
{$t('common.add')}
|
{$t('common.add')}
|
||||||
|
|||||||
@@ -48,8 +48,9 @@
|
|||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<Menu class="flex-1" placement="bottom-end">
|
<Menu class="flex-1" placement="bottom-end">
|
||||||
{#snippet target()}
|
{#snippet target(attachment)}
|
||||||
<Button
|
<Button
|
||||||
|
{@attach attachment}
|
||||||
aria-label={$t('post.actions.more.label')}
|
aria-label={$t('post.actions.more.label')}
|
||||||
size="square-sm"
|
size="square-sm"
|
||||||
color="none"
|
color="none"
|
||||||
|
|||||||
@@ -240,8 +240,8 @@
|
|||||||
{/if}
|
{/if}
|
||||||
{#if isAdmin(profile.current?.user)}
|
{#if isAdmin(profile.current?.user)}
|
||||||
<Menu class="ml-auto" placement="bottom-end">
|
<Menu class="ml-auto" placement="bottom-end">
|
||||||
{#snippet target()}
|
{#snippet target(attachment)}
|
||||||
<Button size="sm" rounding="pill">
|
<Button {@attach attachment} size="sm" rounding="pill">
|
||||||
<ShieldIcon width={16} filled />
|
<ShieldIcon width={16} filled />
|
||||||
{$t('moderation.label')}
|
{$t('moderation.label')}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Reference in new issue
Block a user