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"
import {pushModal} from "@app/util/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>
2025-11-05 23:32:55 +00:00
<div class="card2 bg-alt flex flex-col gap-4 shadow-md">
<div class="flex justify-between">
2025-04-15 18:03:27 +00:00
<Profile {pubkey} {url} />
2025-06-05 19:25:55 +00:00
<Button onclick={openProfile} class="btn btn-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} />
2025-06-05 19:25:55 +00:00
<Button onclick={openProfile} class="btn btn-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>