feat: use masto client
This commit is contained in:
parent
4adab40932
commit
90c45b435f
14 changed files with 96 additions and 205 deletions
22
components/status/StatusCard.vue
Normal file
22
components/status/StatusCard.vue
Normal file
|
@ -0,0 +1,22 @@
|
|||
<script setup lang="ts">
|
||||
import type { Status } from 'masto'
|
||||
|
||||
const { status } = defineProps<{
|
||||
status: Status
|
||||
}>()
|
||||
const el = ref<HTMLElement>()
|
||||
|
||||
const router = useRouter()
|
||||
function go(e: MouseEvent) {
|
||||
if (e.target === el.value)
|
||||
router.push(`/@${status.account.acct}/${status.id}`)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div ref="el" flex flex-col gap-2 my-4 @click="go">
|
||||
<AccountInfo :account="status.account" />
|
||||
<StatusBody :status="status" />
|
||||
<StatusActions :status="status" />
|
||||
</div>
|
||||
</template>
|
Loading…
Add table
Add a link
Reference in a new issue