2024-11-30 02:19:32 +01:00
|
|
|
<template>
|
2024-11-30 16:21:16 +01:00
|
|
|
<Card as="article" class="rounded-none border-0 duration-200 shadow-none">
|
2024-11-30 02:19:32 +01:00
|
|
|
<CardHeader class="pb-4">
|
2024-11-30 16:21:16 +01:00
|
|
|
<ReblogHeader v-if="!!note.reblog" :avatar="note.account.avatar"
|
|
|
|
|
:display-name="note.account.display_name" />
|
|
|
|
|
<Header :avatar="noteToUse.account.avatar" :corner-avatar="note.reblog ? note.account.avatar : undefined"
|
|
|
|
|
:acct="noteToUse.account.acct" :display-name="noteToUse.account.display_name"
|
|
|
|
|
:visibility="noteToUse.visibility" :url="accountUrl" :created-at="new Date(noteToUse.created_at)" />
|
2024-11-30 02:19:32 +01:00
|
|
|
</CardHeader>
|
|
|
|
|
<CardContent>
|
2024-11-30 16:21:16 +01:00
|
|
|
<Content :content="noteToUse.content" />
|
2024-11-30 02:19:32 +01:00
|
|
|
</CardContent>
|
2024-11-30 16:21:16 +01:00
|
|
|
<CardFooter>
|
|
|
|
|
<Actions :reply-count="noteToUse.replies_count" :like-count="noteToUse.favourites_count"
|
|
|
|
|
:reblog-count="noteToUse.reblogs_count" />
|
|
|
|
|
</CardFooter>
|
2024-11-30 02:19:32 +01:00
|
|
|
</Card>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import type { Status } from "@versia/client/types";
|
2024-11-30 16:21:16 +01:00
|
|
|
import { Card, CardFooter, CardHeader } from "../ui/card";
|
|
|
|
|
import Actions from "./actions.vue";
|
2024-11-30 02:19:32 +01:00
|
|
|
import Content from "./content.vue";
|
|
|
|
|
import Header from "./header.vue";
|
2024-11-30 16:21:16 +01:00
|
|
|
import ReblogHeader from "./reblog-header.vue";
|
2024-11-30 02:19:32 +01:00
|
|
|
|
|
|
|
|
const { note } = defineProps<{
|
|
|
|
|
note: Status;
|
|
|
|
|
}>();
|
|
|
|
|
|
2024-11-30 16:21:16 +01:00
|
|
|
// Notes can be reblogs or quotes, in which case
|
|
|
|
|
// the actual thing to render is inside the reblog or quote
|
|
|
|
|
const noteToUse = note.reblog ? note.reblog : note.quote ? note.quote : note;
|
|
|
|
|
|
|
|
|
|
const url = `/@${noteToUse.account.acct}/${noteToUse.id}`;
|
|
|
|
|
const accountUrl = `/@${noteToUse.account.acct}`;
|
|
|
|
|
</script>
|