elk/components/account/AccountInlineInfo.vue

32 lines
878 B
Vue
Raw Permalink Normal View History

2022-11-18 12:37:22 +03:00
<script setup lang="ts">
2023-01-08 09:21:09 +03:00
import type { mastodon } from 'masto'
2022-11-18 12:37:22 +03:00
const { link = true, avatar = true } = defineProps<{
2023-01-08 09:21:09 +03:00
account: mastodon.v1.Account
2022-11-24 11:57:24 +03:00
link?: boolean
avatar?: boolean
2022-11-18 12:37:22 +03:00
}>()
const userSettings = useUserSettings()
2022-11-18 12:37:22 +03:00
</script>
2023-03-20 01:36:09 +03:00
<script lang="ts">
export default {
inheritAttrs: false,
}
</script>
2022-11-18 12:37:22 +03:00
<template>
2022-11-27 07:30:21 +03:00
<AccountHoverWrapper :account="account">
<NuxtLink
:to="link ? getAccountRoute(account) : undefined"
2023-03-20 01:36:09 +03:00
:class="link ? 'text-link-rounded -ml-1.5rem pl-1.5rem rtl-(ml0 pl-0.5rem -mr-1.5rem pr-1.5rem)' : ''"
v-bind="$attrs"
2022-12-12 01:40:40 +03:00
min-w-0 flex gap-2 items-center
2022-11-27 07:30:21 +03:00
>
<AccountAvatar v-if="avatar" :account="account" w-5 h-5 />
<AccountDisplayName :account="account" :hide-emojis="getPreferences(userSettings, 'hideUsernameEmojis')" line-clamp-1 ws-pre-wrap break-all />
2022-11-27 07:30:21 +03:00
</NuxtLink>
</AccountHoverWrapper>
2022-11-18 12:37:22 +03:00
</template>