Skip to content

Commit

Permalink
feat: use pointer when clickable status (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 authored Nov 26, 2022
1 parent 4bb2910 commit 175e312
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions components/status/StatusBody.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
<script setup lang="ts">
import type { Status } from 'masto'
const { status } = defineProps<{
const { status, withAction = true } = defineProps<{
status: Status
withAction?: boolean
}>()
const { translation } = useTranslation(status)
</script>

<template>
<div class="status-body" whitespace-pre-wrap break-words>
<div class="status-body" whitespace-pre-wrap break-words :class="{ 'with-action': withAction }">
<ContentRich
:content="translation.visible ? translation.text : status.content"
:emojis="status.emojis"
/>
</div>
</template>

<style>
.status-body.with-action p {
cursor: pointer;
}
</style>
2 changes: 1 addition & 1 deletion components/status/StatusDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const date = useFormattedDateTime(status.createdAt)
<template #spoiler>
{{ status.spoilerText }}
</template>
<StatusBody :status="status" text-2xl />
<StatusBody :status="status" :with-action="false" text-2xl />
<StatusMedia
v-if="status.mediaAttachments?.length"
:status="status"
Expand Down

0 comments on commit 175e312

Please sign in to comment.