feat: GitHub cards (#450)

This commit is contained in:
patak 2022-12-17 22:11:39 +01:00 committed by GitHub
parent 7887629954
commit 798f73ece5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 141 additions and 1 deletions

View file

@ -21,6 +21,7 @@ const isSquare = $computed(() => (
))
const providerName = $computed(() => props.card.providerName ? props.card.providerName : new URL(props.card.url).hostname)
const gitHubCards = $(computedEager(() => useFeatureFlags().experimentalGitHubCards))
// TODO: handle card.type: 'photo' | 'video' | 'rich';
</script>
@ -37,8 +38,9 @@ const providerName = $computed(() => props.card.providerName ? props.card.provid
}"
target="_blank"
>
<StatusPreviewGitHub v-if="gitHubCards && providerName === 'GitHub'" :card="card" />
<div
v-if="card.image"
v-else-if="card.image"
flex flex-col
display-block of-hidden
border="base"