enhance(client): show Unicode emoji tooltip with its name (#9399)
* enhance(client): show Unicode emoji tooltip with its name * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: tamaina <tamaina@hotmail.co.jp> Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
parent
ef1224118c
commit
decde50c86
3 changed files with 30 additions and 8 deletions
|
|
@ -3,7 +3,7 @@
|
|||
<div class="bqxuuuey">
|
||||
<div class="reaction">
|
||||
<XReactionIcon :reaction="reaction" :custom-emojis="emojis" class="icon" :no-style="true"/>
|
||||
<div class="name">{{ reaction.replace('@.', '') }}</div>
|
||||
<div class="name">{{ getReactionName(reaction) }}</div>
|
||||
</div>
|
||||
<div class="users">
|
||||
<div v-for="u in users" :key="u.id" class="user">
|
||||
|
|
@ -20,6 +20,7 @@
|
|||
import { } from 'vue';
|
||||
import MkTooltip from './MkTooltip.vue';
|
||||
import XReactionIcon from '@/components/MkReactionIcon.vue';
|
||||
import { getEmojiName } from '@/scripts/emojilist';
|
||||
|
||||
defineProps<{
|
||||
showing: boolean;
|
||||
|
|
@ -33,6 +34,14 @@ defineProps<{
|
|||
const emit = defineEmits<{
|
||||
(ev: 'closed'): void;
|
||||
}>();
|
||||
|
||||
function getReactionName(reaction: string): string {
|
||||
const trimLocal = reaction.replace('@.', '');
|
||||
if (trimLocal.startsWith(':')) {
|
||||
return trimLocal;
|
||||
}
|
||||
return getEmojiName(reaction) ?? reaction;
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue