fix: show emoji in nav account (#159)

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

View File

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