feat: add preference to hide emojis in usernames (#1612)
This commit is contained in:
parent
0258894484
commit
e92d1c6adf
8 changed files with 91 additions and 6 deletions
|
@ -4,12 +4,15 @@ import type { mastodon } from 'masto'
|
|||
defineProps<{
|
||||
account: mastodon.v1.Account
|
||||
}>()
|
||||
|
||||
const userSettings = useUserSettings()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ContentRich
|
||||
:content="getDisplayName(account, { rich: true })"
|
||||
:emojis="account.emojis"
|
||||
:show-emojis="!getPreferences(userSettings, 'hideUsernameEmojis')"
|
||||
:markdown="false"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
@ -7,10 +7,12 @@ defineOptions({
|
|||
const {
|
||||
content,
|
||||
emojis,
|
||||
showEmojis = true,
|
||||
markdown = true,
|
||||
} = defineProps<{
|
||||
content: string
|
||||
emojis?: mastodon.v1.CustomEmoji[]
|
||||
showEmojis?: boolean
|
||||
markdown?: boolean
|
||||
}>()
|
||||
|
||||
|
@ -21,6 +23,7 @@ export default () => h(
|
|||
{ class: 'content-rich', dir: 'auto' },
|
||||
contentToVNode(content, {
|
||||
emojis: emojisObject.value,
|
||||
showEmojis,
|
||||
markdown,
|
||||
}),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue