1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-09 10:29:57 +00:00
elk/components/status/StatusPreviewCard.vue

22 lines
811 B
Vue
Raw Normal View History

<script setup lang="ts">
2023-01-08 06:21:09 +00:00
import type { mastodon } from 'masto'
const props = defineProps<{
2023-01-08 06:21:09 +00:00
card: mastodon.v1.PreviewCard
/** For the preview image, only the small image mode is displayed */
smallPictureOnly?: boolean
/** When it is root card in the list, not appear as a child card */
root?: boolean
}>()
const providerName = props.card.providerName
2023-01-15 14:19:22 +00:00
const gitHubCards = $(usePreferences('experimentalGitHubCards'))
</script>
<template>
<LazyStatusPreviewGitHub v-if="gitHubCards && providerName === 'GitHub'" :card="card" />
<LazyStatusPreviewStackBlitz v-else-if="gitHubCards && providerName === 'StackBlitz'" :card="card" :small-picture-only="smallPictureOnly" :root="root" />
<StatusPreviewCardNormal v-else :card="card" :small-picture-only="smallPictureOnly" :root="root" />
</template>