2022-12-07 15:55:45 +00:00
|
|
|
<script setup lang="ts">
|
2023-01-08 06:21:09 +00:00
|
|
|
import type { mastodon } from 'masto'
|
2022-12-07 15:55:45 +00:00
|
|
|
|
2022-12-09 21:13:59 +00:00
|
|
|
const props = defineProps<{
|
2023-01-08 06:21:09 +00:00
|
|
|
card: mastodon.v1.PreviewCard
|
2022-12-09 21:13:59 +00:00
|
|
|
/** 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
|
2022-12-07 15:55:45 +00:00
|
|
|
}>()
|
2022-12-13 18:30:40 +00:00
|
|
|
|
2023-02-01 18:01:38 +00:00
|
|
|
const providerName = props.card.providerName
|
2022-12-07 15:55:45 +00:00
|
|
|
|
2024-02-21 15:20:08 +00:00
|
|
|
const gitHubCards = usePreferences('experimentalGitHubCards')
|
2022-12-07 15:55:45 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2023-01-17 09:59:16 +00:00
|
|
|
<LazyStatusPreviewGitHub v-if="gitHubCards && providerName === 'GitHub'" :card="card" />
|
2023-02-01 18:01:38 +00:00
|
|
|
<LazyStatusPreviewStackBlitz v-else-if="gitHubCards && providerName === 'StackBlitz'" :card="card" :small-picture-only="smallPictureOnly" :root="root" />
|
2023-01-17 09:59:16 +00:00
|
|
|
<StatusPreviewCardNormal v-else :card="card" :small-picture-only="smallPictureOnly" :root="root" />
|
2022-12-07 15:55:45 +00:00
|
|
|
</template>
|