mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-14 21:09:58 +00:00
feat: add credits to creators in link previews using fediverse:creator
(#3012)
This commit is contained in:
parent
98a910c6f1
commit
41346e318b
2 changed files with 24 additions and 0 deletions
19
components/status/StatusPreviewCardMoreFromAuthor.vue
Normal file
19
components/status/StatusPreviewCardMoreFromAuthor.vue
Normal file
|
@ -0,0 +1,19 @@
|
|||
<script setup lang="ts">
|
||||
import type { mastodon } from 'masto'
|
||||
|
||||
defineProps<{
|
||||
account: mastodon.v1.Account
|
||||
}>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
max-h-2xl
|
||||
flex gap-2
|
||||
my-auto
|
||||
bg-gray-300
|
||||
>
|
||||
<span z-0>More from</span>
|
||||
<AccountInlineInfo :account="account" hover:bg-gray-300 />
|
||||
</div>
|
||||
</template>
|
|
@ -104,6 +104,11 @@ function loadAttachment() {
|
|||
<div :class="cardTypeIconMap[card.type]" w="30%" h="30%" text-secondary />
|
||||
</div>
|
||||
<StatusPreviewCardInfo :p="isSquare ? 'x-4' : '4'" :root="root" :card="card" :provider="providerName" />
|
||||
<StatusPreviewCardMoreFromAuthor
|
||||
v-if="card?.authors?.[0].account"
|
||||
:account="card.authors[0].account"
|
||||
p-4 py-2
|
||||
/>
|
||||
</NuxtLink>
|
||||
</template>
|
||||
|
||||
|
|
Loading…
Reference in a new issue