fix: `MkPageWindow` doesn't render custom emojis in the titlebar when displaying a user profile who has custom emojis in their display-name

This commit is contained in:
Tess K 2024-05-02 17:53:05 +00:00 committed by Ember
parent e0afeff248
commit b7ceb2063b
2 changed files with 3 additions and 2 deletions

View File

@ -18,7 +18,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<template #header> <template #header>
<template v-if="pageMetadata"> <template v-if="pageMetadata">
<i v-if="pageMetadata.icon" :class="pageMetadata.icon" style="margin-right: 0.5em;"></i> <i v-if="pageMetadata.icon" :class="pageMetadata.icon" style="margin-right: 0.5em;"></i>
<span>{{ pageMetadata.title }}</span> <span><MkUserName v-if="pageMetadata.userName?.name" :user="pageMetadata.userName" />{{ pageMetadata.title }}</span>
</template> </template>
</template> </template>
@ -43,6 +43,7 @@ import { claimAchievement } from '@/scripts/achievements.js';
import { getScrollContainer } from '@/scripts/scroll.js'; import { getScrollContainer } from '@/scripts/scroll.js';
import { useRouterFactory } from '@/router/supplier.js'; import { useRouterFactory } from '@/router/supplier.js';
import { mainRouter } from '@/router/main.js'; import { mainRouter } from '@/router/main.js';
import MkUserName from './global/MkUserName.vue';
const props = defineProps<{ const props = defineProps<{
initialPath: string; initialPath: string;

View File

@ -130,7 +130,7 @@ definePageMetadata(() => ({
title: i18n.ts.user, title: i18n.ts.user,
icon: 'ph-user ph-bold ph-lg', icon: 'ph-user ph-bold ph-lg',
...user.value ? { ...user.value ? {
title: user.value.name ? `${user.value.name} (@${user.value.username})` : `@${user.value.username}`, title: user.value.name ? ` (@${user.value.username})` : `@${user.value.username}`,
subtitle: `@${getAcct(user.value)}`, subtitle: `@${getAcct(user.value)}`,
userName: user.value, userName: user.value,
avatar: user.value, avatar: user.value,