2026-07-03 00:27:28 +00:00
|
|
|
<script lang="ts">
|
|
|
|
|
import type {Snippet} from "svelte"
|
2026-07-03 00:32:44 +00:00
|
|
|
import type {Instance} from "tippy.js"
|
2026-07-03 00:27:28 +00:00
|
|
|
import MenuDots from "@assets/icons/menu-dots.svg?dataurl"
|
|
|
|
|
import Icon from "@lib/components/Icon.svelte"
|
2026-07-03 00:32:44 +00:00
|
|
|
import Tippy from "@lib/components/Tippy.svelte"
|
2026-07-03 00:27:28 +00:00
|
|
|
import Button from "@lib/components/Button.svelte"
|
2026-07-03 00:32:44 +00:00
|
|
|
import ProfileMenuList from "@app/components/ProfileMenuList.svelte"
|
2026-07-03 00:27:28 +00:00
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
|
pubkey: string
|
|
|
|
|
url?: string
|
|
|
|
|
customActions?: Snippet
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const {pubkey, url, customActions}: Props = $props()
|
|
|
|
|
|
2026-07-03 00:32:44 +00:00
|
|
|
const hidePopover = () => popover?.hide()
|
2026-07-03 00:27:28 +00:00
|
|
|
|
2026-07-03 00:32:44 +00:00
|
|
|
let popover: Instance | undefined = $state()
|
2026-08-29 17:12:09 +00:00
|
|
|
let showPopover: () => void = $state(() => {})
|
2026-07-03 00:27:28 +00:00
|
|
|
</script>
|
|
|
|
|
|
2026-07-03 00:32:44 +00:00
|
|
|
<Button onclick={showPopover} class="button button-circle button-ghost button-sm">
|
|
|
|
|
<Tippy
|
|
|
|
|
bind:popover
|
2026-08-29 17:12:09 +00:00
|
|
|
bind:show={showPopover}
|
2026-07-03 00:32:44 +00:00
|
|
|
component={ProfileMenuList}
|
|
|
|
|
props={{pubkey, url, customActions, onClick: hidePopover}}
|
|
|
|
|
params={{trigger: "manual", interactive: true, placement: "bottom-end"}}>
|
2026-07-03 00:27:28 +00:00
|
|
|
<Icon icon={MenuDots} />
|
2026-07-03 00:32:44 +00:00
|
|
|
</Tippy>
|
|
|
|
|
</Button>
|