fix: replace a tag with NuxtLink (#906)

This commit is contained in:
三咲智子 Kevin Deng 2023-01-09 21:22:19 +08:00 committed by GitHub
parent 2de0974d6b
commit 675a14db80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 37 additions and 24 deletions

View file

@ -168,11 +168,11 @@ const showReplyTo = $computed(() => !replyToMain && !directReply)
<AccountBotIndicator v-if="status.account.bot" me-2 />
<div flex>
<CommonTooltip :content="createdAt">
<a :title="status.createdAt" :href="statusRoute.href" @click.prevent="go($event)">
<NuxtLink :title="status.createdAt" :href="statusRoute.href" @click.prevent="go($event)">
<time text-sm ws-nowrap hover:underline :datetime="status.createdAt">
{{ timeago }}
</time>
</a>
</NuxtLink>
</CommonTooltip>
<StatusEditIndicator :status="status" inline />
</div>

View file

@ -46,6 +46,7 @@ const cardTypeIconMap: Record<mastodon.v1.PreviewCardType, string> = {
'rounded-lg border border-base': !root,
}"
target="_blank"
external
>
<div
v-if="card.image"

View file

@ -99,13 +99,13 @@ const meta = $computed(() => {
<div p4 sm:px-8 flex flex-col justify-between min-h-50 md:min-h-60 h-full>
<div flex justify-between items-center gap-2 sm:gap-6 h-full mb-2 min-h-35 md:min-h-45>
<div flex flex-col gap-2>
<a flex gap-1 text-xl sm:text-3xl flex-wrap leading-none :href="meta.titleUrl" target="_blank">
<NuxtLink flex gap-1 text-xl sm:text-3xl flex-wrap leading-none :href="meta.titleUrl" target="_blank" external>
<template v-if="meta.repo">
<span>{{ meta.user }}</span><span text-secondary-light>/</span><span text-primary font-bold>{{ meta.repo }}</span>
</template>
<span v-else>{{ meta.user }}</span>
</a>
<a sm:text-lg :href="card.url" target="_blank">
</NuxtLink>
<NuxtLink sm:text-lg :href="card.url" target="_blank" external>
<span v-if="meta.type === 'issue'" text-secondary-light me-2>
#{{ meta.number }}
</span>
@ -113,12 +113,12 @@ const meta = $computed(() => {
PR #{{ meta.number }}
</span>
<span text-secondary leading-tight>{{ meta.details }}</span>
</a>
</NuxtLink>
</div>
<div>
<a :href="meta.titleUrl" target="_blank">
<NuxtLink :href="meta.titleUrl" target="_blank" external>
<img w-30 aspect-square width="20" height="20" rounded-2 :src="meta.avatar">
</a>
</NuxtLink>
</div>
</div>
<div flex justify-between>