fix: show emoji in nav account (#159)

This commit is contained in:
Shinigami 2022-11-27 17:59:33 +01:00 committed by GitHub
parent 75aaf85e84
commit d967520005
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 6 deletions

View file

@ -11,13 +11,11 @@
<NavSideItem text="Conversations" to="/conversations" icon="i-ri:at-line" />
<NavSideItem text="Favourites" to="/favourites" icon="i-ri:heart-3-line" />
<NavSideItem text="Bookmarks" to="/bookmarks" icon="i-ri:bookmark-line " />
<NavSideItem
:text="currentUser.account.displayName || 'Profile'"
:to="getAccountPath(currentUser.account)" icon="i-ri:list-check-2-line"
>
<NavSideItem :to="getAccountPath(currentUser.account)" icon="i-ri:list-check-2-line">
<template #icon>
<AccountAvatar :account="currentUser.account" h="1.2em" />
</template>
<ContentRich :content="getDisplayName(currentUser.account, { rich: true })" :emojis="currentUser.account.emojis" />
</NavSideItem>
</template>
</nav>

View file

@ -1,9 +1,14 @@
<script setup lang="ts">
defineProps<{
text: string
text?: string
icon: string
to: string
}>()
defineSlots<{
icon: {}
default: {}
}>()
</script>
<template>
@ -12,7 +17,9 @@ defineProps<{
<slot name="icon">
<div :class="icon" />
</slot>
<span>{{ text }}</span>
<slot>
<span>{{ text }}</span>
</slot>
</div>
</NuxtLink>
</template>