🐛 Fix bugs causing by upgraded to v2
This commit is contained in:
parent
6693acb24a
commit
b9d89149b0
@ -2,15 +2,15 @@
|
||||
<v-card :to="url" class="mx-[2.5ch] mb-3">
|
||||
<v-card-text>
|
||||
<div class="mb-3 flex flex-row gap-4">
|
||||
<nuxt-link :to="`/users/${post.author?.name}`">
|
||||
<v-avatar :image="post.author?.avatar" />
|
||||
<nuxt-link :to="`/users/${post.publisher?.name}`">
|
||||
<v-avatar :image="post.publisher?.avatar" />
|
||||
</nuxt-link>
|
||||
<div class="flex flex-col">
|
||||
<span>{{ post.author?.nick }} <span class="text-xs">@{{ post.author?.name }}</span></span>
|
||||
<span>{{ post.publisher?.nick }} <span class="text-xs">@{{ post.publisher?.name }}</span></span>
|
||||
<span v-if="post.body?.title" class="text-md">{{ post.body?.title }}</span>
|
||||
<span v-if="post.body?.description" class="text-sm">{{ post.body?.description }}</span>
|
||||
<span v-if="!post.body?.title && !post.body?.description" class="text-sm">
|
||||
{{ post.author?.description }}
|
||||
{{ post.publisher?.description }}
|
||||
</span>
|
||||
|
||||
<div v-if="post.type != 'story'" class="mt-1">
|
||||
|
@ -19,8 +19,8 @@ async function loadPost({ done }: any) {
|
||||
offset: posts.value.length.toString(),
|
||||
})
|
||||
|
||||
if (props.author) {
|
||||
searchQueries.set("author", props.author)
|
||||
if (props.publisher) {
|
||||
searchQueries.set("author", props.publisher)
|
||||
}
|
||||
if (props.realm) {
|
||||
searchQueries.set("realm", props.realm)
|
||||
|
@ -10,16 +10,6 @@
|
||||
</div>
|
||||
</v-col>
|
||||
<v-col cols="12" md="4" class="px-5 pt-3">
|
||||
<div class="mt-3 mb-4.5 mx-[2.5ch] flex flex-row gap-4 items-center">
|
||||
<nuxt-link :to="`/users/${attachment.account?.name}`">
|
||||
<v-avatar :image="attachment.account?.avatar" />
|
||||
</nuxt-link>
|
||||
<div class="flex flex-col">
|
||||
<span class="text-xs">Uploaded by</span>
|
||||
<span>{{ attachment.account?.nick }} <span class="text-xs">@{{ attachment.account?.name }}</span></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<v-card class="mb-5">
|
||||
<v-card-text class="flex flex-col gap-4">
|
||||
<div class="flex flex-col" v-if="attachment?.alt">
|
||||
@ -84,7 +74,7 @@ if (!attachment.value) {
|
||||
})
|
||||
}
|
||||
|
||||
const title = computed(() => `Attachment from ${attachment.value.account.nick}`)
|
||||
const title = computed(() => `Attachment ${attachment.value?.id}`)
|
||||
|
||||
watch(attachment, (value) => {
|
||||
if (value.mimetype.split("/")[0] == "image") {
|
||||
@ -106,7 +96,6 @@ useHead({
|
||||
})
|
||||
|
||||
useSeoMeta({
|
||||
author: attachment.value?.account.nick,
|
||||
title: title,
|
||||
description: attachment.value?.alt,
|
||||
ogTitle: title,
|
||||
|
@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<v-container class="content-container mx-auto">
|
||||
<div class="my-3 flex flex-row gap-4">
|
||||
<nuxt-link :to="`/users/${post.author?.name}`">
|
||||
<v-avatar :image="post.author?.avatar" />
|
||||
<nuxt-link :to="`/users/${post.publisher?.name}`">
|
||||
<v-avatar :image="post.publisher?.avatar" />
|
||||
</nuxt-link>
|
||||
<div class="flex flex-col">
|
||||
<span>{{ post.author?.nick }} <span class="text-xs">@{{ post.author?.name }}</span></span>
|
||||
<span>{{ post.publisher?.nick }} <span class="text-xs">@{{ post.publisher?.name }}</span></span>
|
||||
<span v-if="post.body?.title" class="text-md">{{ post.body?.title }}</span>
|
||||
<span v-if="post.body?.description" class="text-sm">{{ post.body?.description }}</span>
|
||||
<span v-if="!post.body?.title && !post.body?.description" class="text-sm">{{ post.author?.description }}</span>
|
||||
<span v-if="!post.body?.title && !post.body?.description" class="text-sm">{{ post.publisher?.description }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -108,7 +108,7 @@ if (!post.value) {
|
||||
navigateTo(`/posts/${post.value.area_alias}/${post.value.alias}`)
|
||||
}
|
||||
|
||||
const title = computed(() => post.value.body?.title ? `${post.value.body?.title} by @${post.value.author.name}` : `Post by @${post.value.author.name}`)
|
||||
const title = computed(() => post.value.body?.title ? `${post.value.body?.title} by @${post.value.publisher.name}` : `Post by @${post.value.publisher.name}`)
|
||||
const description = computed(() => post.value.body?.description ?? post.value.body?.content.substring(0, 280).trim())
|
||||
|
||||
watch(attachments, (value) => {
|
||||
@ -134,7 +134,7 @@ useHead({
|
||||
})
|
||||
|
||||
useSeoMeta({
|
||||
author: post.value.author.nick,
|
||||
author: post.value.publisher.nick,
|
||||
title: title,
|
||||
articlePublishedTime: post.value.publishedAt,
|
||||
description: description,
|
||||
|
Loading…
Reference in New Issue
Block a user