2025-03-28 01:16:24 +01:00
|
|
|
<template>
|
2025-07-10 05:13:42 +02:00
|
|
|
<Row class="gap-2" wrap
|
2025-03-28 01:16:24 +01:00
|
|
|
v-if="isDeveloper || account.bot || roles.length > 0"
|
|
|
|
|
>
|
|
|
|
|
<ProfileBadge
|
|
|
|
|
v-if="isDeveloper"
|
|
|
|
|
:name="m.nice_bad_grizzly_coax()"
|
|
|
|
|
:description="m.honest_jolly_shell_blend()"
|
|
|
|
|
:verified="true"
|
|
|
|
|
/>
|
|
|
|
|
<ProfileBadge
|
|
|
|
|
v-if="account.bot"
|
|
|
|
|
:name="m.merry_red_shrimp_bump()"
|
|
|
|
|
:description="m.sweet_mad_jannes_create()"
|
|
|
|
|
/>
|
|
|
|
|
<ProfileBadge
|
|
|
|
|
v-for="role in roles"
|
|
|
|
|
:key="role.id"
|
|
|
|
|
:name="role.name"
|
|
|
|
|
:description="role.description"
|
|
|
|
|
:icon="role.icon"
|
|
|
|
|
/>
|
2025-07-10 05:13:42 +02:00
|
|
|
</Row>
|
2025-03-28 01:16:24 +01:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
2025-05-26 11:19:15 +02:00
|
|
|
import type { Account } from "@versia/client/schemas";
|
|
|
|
|
import type { z } from "zod";
|
2025-07-16 07:48:39 +02:00
|
|
|
import * as m from "~~/paraglide/messages.js";
|
2025-07-10 05:13:42 +02:00
|
|
|
import Row from "../typography/layout/row.vue";
|
2025-03-28 01:16:24 +01:00
|
|
|
import ProfileBadge from "./profile-badge.vue";
|
|
|
|
|
|
|
|
|
|
const { account } = defineProps<{
|
2025-05-26 11:19:15 +02:00
|
|
|
account: z.infer<typeof Account>;
|
2025-03-28 01:16:24 +01:00
|
|
|
}>();
|
2025-08-28 07:41:51 +02:00
|
|
|
const authStore = useAuthStore();
|
2025-03-28 01:16:24 +01:00
|
|
|
|
|
|
|
|
const config = useConfig();
|
|
|
|
|
const roles = account.roles.filter((r) => r.visible);
|
|
|
|
|
// Get user handle in username@instance format
|
|
|
|
|
const handle = account.acct.includes("@")
|
|
|
|
|
? account.acct
|
2025-08-28 07:41:51 +02:00
|
|
|
: `${account.acct}@${authStore.instance?.domain ?? window.location.host}`;
|
2025-03-28 01:16:24 +01:00
|
|
|
const isDeveloper = config.DEVELOPER_HANDLES.includes(handle);
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style></style>
|