mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 08:28:20 +01:00
fix: 🐛 Properly render emojis in display names
This commit is contained in:
parent
9dede81d20
commit
7c63b81129
|
|
@ -9,7 +9,7 @@
|
||||||
<div class="flex flex-row text-sm items-center justify-between w-full">
|
<div class="flex flex-row text-sm items-center justify-between w-full">
|
||||||
<NuxtLink :href="accountUrl" class="font-semibold text-gray-200 line-clamp-1 break-all">
|
<NuxtLink :href="accountUrl" class="font-semibold text-gray-200 line-clamp-1 break-all">
|
||||||
<Skeleton :enabled="!note" :min-width="90" :max-width="170" shape="rect">
|
<Skeleton :enabled="!note" :min-width="90" :max-width="170" shape="rect">
|
||||||
{{ note?.account.display_name }}
|
<span v-html="display_name"></span>
|
||||||
</Skeleton>
|
</Skeleton>
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
<NuxtLink :href="noteUrl" class="text-gray-300 ml-2 line-clamp-1 break-all shrink-0">
|
<NuxtLink :href="noteUrl" class="text-gray-300 ml-2 line-clamp-1 break-all shrink-0">
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
<div class="flex flex-row items-center justify-between w-full">
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
<NuxtLink :href="accountUrl" class="font-semibold text-gray-200 line-clamp-1 break-all">
|
<NuxtLink :href="accountUrl" class="font-semibold text-gray-200 line-clamp-1 break-all">
|
||||||
<Skeleton :enabled="!note" :min-width="90" :max-width="170" shape="rect">
|
<Skeleton :enabled="!note" :min-width="90" :max-width="170" shape="rect">
|
||||||
{{ note?.account.display_name }}
|
<span v-html="display_name"></span>
|
||||||
</Skeleton>
|
</Skeleton>
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
<NuxtLink v-if="note" :href="noteUrl" class="text-gray-300 text-sm ml-2 line-clamp-1 break-all shrink-0"
|
<NuxtLink v-if="note" :href="noteUrl" class="text-gray-300 text-sm ml-2 line-clamp-1 break-all shrink-0"
|
||||||
|
|
@ -86,6 +86,7 @@ const props = defineProps<{
|
||||||
|
|
||||||
const username = props.note?.account.acct.split("@")[0];
|
const username = props.note?.account.acct.split("@")[0];
|
||||||
const instance = props.note?.account.acct.split("@")[1];
|
const instance = props.note?.account.acct.split("@")[1];
|
||||||
|
const { display_name } = useParsedAccount(props.note?.account, settings);
|
||||||
|
|
||||||
const noteUrl = props.note && `/@${props.note.account.acct}/${props.note.id}`;
|
const noteUrl = props.note && `/@${props.note.account.acct}/${props.note.id}`;
|
||||||
const accountUrl = props.note && `/@${props.note.account.acct}`;
|
const accountUrl = props.note && `/@${props.note.account.acct}`;
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,10 @@ export const useParsedAccount = (
|
||||||
account: MaybeRef<Account | undefined | null>,
|
account: MaybeRef<Account | undefined | null>,
|
||||||
settings: MaybeRef<Settings>,
|
settings: MaybeRef<Settings>,
|
||||||
) => {
|
) => {
|
||||||
const displayName = computed(() => toValue(account)?.display_name ?? "");
|
const displayName = computed(
|
||||||
|
() =>
|
||||||
|
toValue(account)?.display_name ?? toValue(account)?.username ?? "",
|
||||||
|
);
|
||||||
const note = computed(() => toValue(account)?.note ?? "");
|
const note = computed(() => toValue(account)?.note ?? "");
|
||||||
const fields = computed(() => toValue(account)?.fields ?? []);
|
const fields = computed(() => toValue(account)?.fields ?? []);
|
||||||
const emojis = computed(() => toValue(account)?.emojis ?? []);
|
const emojis = computed(() => toValue(account)?.emojis ?? []);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue