2023-02-03 23:25:33 +05:30
|
|
|
<script
|
|
|
|
context="module"
|
|
|
|
lang="ts"
|
|
|
|
>
|
2023-01-25 22:41:11 +05:30
|
|
|
export type UserType = {
|
|
|
|
name: string;
|
|
|
|
fullName?: string;
|
|
|
|
desc?: string;
|
|
|
|
loc?: string;
|
|
|
|
email?: string;
|
|
|
|
matrix?: string;
|
|
|
|
fediverse?: string;
|
|
|
|
website?: string;
|
|
|
|
capsule?: string;
|
|
|
|
online: boolean;
|
|
|
|
created: number;
|
|
|
|
op: boolean;
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
2023-02-03 23:25:33 +05:30
|
|
|
<script lang="ts">
|
|
|
|
export let user: UserType;
|
|
|
|
import dayjs from "dayjs";
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<div
|
|
|
|
class="flex flex-col gap-4 rounded bg-secondary p-4 w-110 no-underline text-text"
|
|
|
|
>
|
2023-01-25 22:41:11 +05:30
|
|
|
<div class="flex flex-col gap-2 flex-1">
|
|
|
|
<div>
|
|
|
|
{#if user.fullName}
|
|
|
|
<span class="text-2xl">{user.fullName} ({user.name})</span>
|
|
|
|
{:else}
|
|
|
|
<span class="text-2xl">{user.name}</span>
|
|
|
|
{/if}
|
|
|
|
{#if user.op}
|
|
|
|
<span class="text-2xl"> - Admin</span>
|
|
|
|
{/if}
|
|
|
|
</div>
|
|
|
|
{#if user.desc}
|
|
|
|
<p>{user.desc}</p>
|
|
|
|
{/if}
|
|
|
|
{#if user.loc}
|
|
|
|
<span class="button w-fit !bg-alt !text-text">{user.loc}</span>
|
|
|
|
{/if}
|
2023-02-03 23:25:33 +05:30
|
|
|
<span class="button w-fit !bg-alt !text-text"
|
|
|
|
>Joined: {dayjs.unix(user.created).format("DD/MM/YYYY")}</span
|
|
|
|
>
|
2023-01-25 22:41:11 +05:30
|
|
|
</div>
|
|
|
|
<div class="children:text-text flex flex-row items-center gap-4 text-lg">
|
|
|
|
{#if user.email}
|
|
|
|
<a href="mailto:{user.email}"><div class="i-ic:outline-email" /></a>
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
{#if user.matrix}
|
2023-03-30 12:30:36 +05:30
|
|
|
<a href="https://matrix.to/#/{user.matrix}"
|
|
|
|
><div class="i-simple-icons:matrix" /></a
|
|
|
|
>
|
2023-01-25 22:41:11 +05:30
|
|
|
{/if}
|
|
|
|
|
|
|
|
{#if user.fediverse}
|
2023-03-30 12:30:36 +05:30
|
|
|
<a href="https://{user.fediverse}"
|
|
|
|
><div class="i-simple-icons:mastodon" /></a
|
|
|
|
>
|
2023-01-25 22:41:11 +05:30
|
|
|
{/if}
|
|
|
|
|
|
|
|
{#if user.website}
|
|
|
|
<a href={user.website}><div class="i-ic:outline-language" /></a>
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
{#if user.capsule}
|
2023-02-03 23:25:33 +05:30
|
|
|
<a
|
2023-04-13 14:00:42 +05:30
|
|
|
href="https://geminiproxy.p.projectsegfau.lt/gemini/{user.capsule}"
|
2023-02-03 23:25:33 +05:30
|
|
|
class="no-underline text-base">Gemini</a
|
|
|
|
>
|
2023-01-25 22:41:11 +05:30
|
|
|
{/if}
|
|
|
|
</div>
|
2023-02-03 23:25:33 +05:30
|
|
|
</div>
|