23 lines
761 B
HTML
23 lines
761 B
HTML
|
<span class="account-display-name">{@html massagedAccountName }</span>
|
||
|
<style>
|
||
|
.account-display-name {
|
||
|
pointer-events: none; /* allows focus to work correctly, focus on the parent only */
|
||
|
}
|
||
|
</style>
|
||
|
<script>
|
||
|
import { emojifyText } from '../../_utils/emojifyText'
|
||
|
import { store } from '../../_store/store'
|
||
|
import escapeHtml from 'escape-html'
|
||
|
|
||
|
export default {
|
||
|
store: () => store,
|
||
|
computed: {
|
||
|
emojis: ({ account }) => (account.emojis || []),
|
||
|
accountName: ({ account }) => (account.display_name || account.username),
|
||
|
massagedAccountName: ({ accountName, emojis, $autoplayGifs }) => {
|
||
|
accountName = escapeHtml(accountName)
|
||
|
return emojifyText(accountName, emojis, $autoplayGifs)
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|