flotilla/src/app/components/PeopleItem.svelte

36 lines
1.1 KiB
Svelte
Raw Normal View History

2024-10-01 21:55:33 +00:00
<script lang="ts">
2025-09-10 22:26:39 +00:00
import UserCircle from "@assets/icons/user-circle.svg?dataurl"
import Icon from "@lib/components/Icon.svelte"
2025-06-05 19:25:55 +00:00
import Button from "@lib/components/Button.svelte"
2024-10-01 21:55:33 +00:00
import Profile from "@app/components/Profile.svelte"
import ProfileInfo from "@app/components/ProfileInfo.svelte"
2025-06-05 20:01:36 +00:00
import ProfileBadges from "@app/components/ProfileBadges.svelte"
2025-06-05 19:25:55 +00:00
import ProfileDetail from "@app/components/ProfileDetail.svelte"
2026-06-08 21:14:40 +00:00
import {pushModal} from "@app/modal"
2024-10-01 21:55:33 +00:00
2025-04-15 18:03:27 +00:00
type Props = {
pubkey: string
url?: string
}
const {pubkey, url}: Props = $props()
2025-06-05 19:25:55 +00:00
const openProfile = () => pushModal(ProfileDetail, {pubkey, url})
2024-10-01 21:55:33 +00:00
</script>
<div class="card card-interactive flex flex-col gap-4">
<div class="flex justify-between">
2025-04-15 18:03:27 +00:00
<Profile {pubkey} {url} />
<Button onclick={openProfile} class="button button-primary hidden sm:flex">
2025-09-10 22:26:39 +00:00
<Icon icon={UserCircle} />
2025-06-05 19:25:55 +00:00
View Profile
</Button>
</div>
2025-04-15 18:03:27 +00:00
<ProfileInfo {pubkey} {url} />
2025-06-05 20:01:36 +00:00
<ProfileBadges {pubkey} {url} />
<Button onclick={openProfile} class="button button-primary sm:hidden">
2025-09-10 22:26:39 +00:00
<Icon icon={UserCircle} />
2025-06-05 19:25:55 +00:00
View Profile
</Button>
</div>