Skip to content

Commit 41346e3

Browse files
authored
feat: add credits to creators in link previews using fediverse:creator (elk-zone#3012)
1 parent 98a910c commit 41346e3

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<script setup lang="ts">
2+
import type { mastodon } from 'masto'
3+
4+
defineProps<{
5+
account: mastodon.v1.Account
6+
}>()
7+
</script>
8+
9+
<template>
10+
<div
11+
max-h-2xl
12+
flex gap-2
13+
my-auto
14+
bg-gray-300
15+
>
16+
<span z-0>More from</span>
17+
<AccountInlineInfo :account="account" hover:bg-gray-300 />
18+
</div>
19+
</template>

components/status/StatusPreviewCardNormal.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ function loadAttachment() {
104104
<div :class="cardTypeIconMap[card.type]" w="30%" h="30%" text-secondary />
105105
</div>
106106
<StatusPreviewCardInfo :p="isSquare ? 'x-4' : '4'" :root="root" :card="card" :provider="providerName" />
107+
<StatusPreviewCardMoreFromAuthor
108+
v-if="card?.authors?.[0].account"
109+
:account="card.authors[0].account"
110+
p-4 py-2
111+
/>
107112
</NuxtLink>
108113
</template>
109114

0 commit comments

Comments
 (0)