Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: partially support read-only emoji reactions #3033

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions components/status/StatusDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,8 @@ useHydratedHead({
<div border="t base" py-2>
<StatusActions v-if="actions" :status="status" details :command="command" />
</div>
<div border="t base" py-2>
<StatusEmojiReaction v-if="actions" :status="status" details :command="command" />
</div>
</div>
</template>
24 changes: 24 additions & 0 deletions components/status/StatusEmojiReaction.vue
Original file line number Diff line number Diff line change
@@ -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>

Check failure on line 16 in components/status/StatusEmojiReaction.vue

View workflow job for this annotation

GitHub Actions / ci

Property 'emojiReactions' does not exist on type 'Status'.
<picture class="custom-emoji" :alt="`:${emoji.name}:`" :data-emoji-id="emoji.name" :title="emoji.name">

Check failure on line 17 in components/status/StatusEmojiReaction.vue

View workflow job for this annotation

GitHub Actions / ci

Property 'name' does not exist on type 'number'.

Check failure on line 17 in components/status/StatusEmojiReaction.vue

View workflow job for this annotation

GitHub Actions / ci

Property 'name' does not exist on type 'number'.

Check failure on line 17 in components/status/StatusEmojiReaction.vue

View workflow job for this annotation

GitHub Actions / ci

Property 'name' does not exist on type 'number'.
<source :srcset="emoji.staticUrl" media="(prefers-reduced-motion: reduce)">

Check failure on line 18 in components/status/StatusEmojiReaction.vue

View workflow job for this annotation

GitHub Actions / ci

Property 'staticUrl' does not exist on type 'number'.
<img :src="emoji.url" :alt="`:${emoji.name}:`" title="" style="">

Check failure on line 19 in components/status/StatusEmojiReaction.vue

View workflow job for this annotation

GitHub Actions / ci

Property 'url' does not exist on type 'number'.

Check failure on line 19 in components/status/StatusEmojiReaction.vue

View workflow job for this annotation

GitHub Actions / ci

Property 'name' does not exist on type 'number'.
</picture>
<CommonLocalizedNumber :keypath="emoji.count" :count="emoji.count" />

Check failure on line 21 in components/status/StatusEmojiReaction.vue

View workflow job for this annotation

GitHub Actions / ci

Property 'count' does not exist on type 'number'.

Check failure on line 21 in components/status/StatusEmojiReaction.vue

View workflow job for this annotation

GitHub Actions / ci

Property 'count' does not exist on type 'number'.
</div>
</div>
</template>
Loading