1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-14 21:09:58 +00:00

feat: partially support read-only emoji reactions

This commit is contained in:
TAKAHASHI Shuuji 2024-11-01 01:18:10 +09:00
parent 54cc0e4735
commit 988e0339f9
No known key found for this signature in database
GPG key ID: F15C887632129F5E
2 changed files with 27 additions and 0 deletions

View file

@ -67,5 +67,8 @@ useHydratedHead({
<div border="t base" py-2> <div border="t base" py-2>
<StatusActions v-if="actions" :status="status" details :command="command" /> <StatusActions v-if="actions" :status="status" details :command="command" />
</div> </div>
<div border="t base" py-2>
<StatusEmojiReaction v-if="actions" :status="status" details :command="command" />
</div>
</div> </div>
</template> </template>

View file

@ -0,0 +1,24 @@
<script setup lang="ts">
import type { mastodon } from 'masto'
const props = defineProps<{
status: mastodon.v1.Status
details?: boolean
}>()
const {
status,
} = useStatusActions(props)
</script>
<template>
<div flex items-center class="status-actions">
<div v-for="(i, emoji) in status.emojiReactions" :key="i" flex-inline gap-1 mr-4 text-secondary>
<picture class="custom-emoji" :alt="`:${emoji.name}:`" :data-emoji-id="emoji.name" :title="emoji.name">
<source :srcset="emoji.staticUrl" media="(prefers-reduced-motion: reduce)">
<img :src="emoji.url" :alt="`:${emoji.name}:`" title="" style="">
</picture>
<CommonLocalizedNumber :keypath="emoji.count" :count="emoji.count" />
</div>
</div>
</template>