mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-05 00:19:59 +00:00
23 lines
557 B
TypeScript
23 lines
557 B
TypeScript
import type { Emoji } from 'masto'
|
|
|
|
export default defineComponent({
|
|
props: {
|
|
content: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
},
|
|
setup(props) {
|
|
const emojis = shallowRef<Record<string, Emoji>>({})
|
|
|
|
onMounted(() => {
|
|
const { server } = useAppCookies()
|
|
const { serverInfos } = useClientState()
|
|
if (server.value)
|
|
emojis.value = serverInfos.value[server.value].customEmojis || {}
|
|
})
|
|
|
|
return () => h('div', { class: 'rich-content' }, contentToVNode(props.content, undefined, emojis.value))
|
|
},
|
|
})
|