1
0
mirror of https://github.com/elk-zone/elk synced 2024-11-28 14:58:10 +09:00
elk/components/status/StatusCard.vue

23 lines
510 B
Vue
Raw Normal View History

2022-11-14 11:20:07 +09:00
<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>