From 675a14db802e2734ff22378ada642395a3db0fcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Mon, 9 Jan 2023 21:22:19 +0800 Subject: [PATCH] fix: replace a tag with NuxtLink (#906) --- .eslintrc | 8 +++++++- components/account/AccountBigCard.vue | 8 ++++---- components/help/HelpPreview.vue | 8 ++++---- components/nav/NavFooter.vue | 12 +++++++++--- components/status/StatusCard.vue | 4 ++-- components/status/StatusPreviewCard.vue | 1 + components/status/StatusPreviewGitHub.vue | 12 ++++++------ components/timeline/TimelinePaginator.vue | 6 +++--- components/user/UserSignIn.vue | 2 +- 9 files changed, 37 insertions(+), 24 deletions(-) diff --git a/.eslintrc b/.eslintrc index 9bb598a2..f56d6544 100644 --- a/.eslintrc +++ b/.eslintrc @@ -8,5 +8,11 @@ "jsonc/sort-keys": "error" } } - ] + ], + "rules": { + "vue/no-restricted-syntax":["error", { + "selector": "VElement[name='a']", + "message": "Use NuxtLink instead." + }] + } } diff --git a/components/account/AccountBigCard.vue b/components/account/AccountBigCard.vue index 1abab8ce..7116d9fe 100644 --- a/components/account/AccountBigCard.vue +++ b/components/account/AccountBigCard.vue @@ -28,9 +28,9 @@ defineOptions({
- + - +
@@ -46,9 +46,9 @@ defineOptions({
- +
diff --git a/components/help/HelpPreview.vue b/components/help/HelpPreview.vue index b7d31232..c412537c 100644 --- a/components/help/HelpPreview.vue +++ b/components/help/HelpPreview.vue @@ -23,17 +23,17 @@ const emit = defineEmits<{

{{ $t('help.desc_para4') }} - + {{ $t('help.desc_para5') }} - + {{ $t('help.desc_para6') }}

{{ $t('help.desc_para3') }}

diff --git a/components/nav/NavFooter.vue b/components/nav/NavFooter.vue index 328b9069..a14a72f6 100644 --- a/components/nav/NavFooter.vue +++ b/components/nav/NavFooter.vue @@ -55,11 +55,17 @@ function toggleDark() { {{ $t('settings.about.label') }} · - Mastodon + + Mastodon + · - Discord + + Discord + · - GitHub + + GitHub + diff --git a/components/status/StatusCard.vue b/components/status/StatusCard.vue index 5748be67..3831e8d0 100644 --- a/components/status/StatusCard.vue +++ b/components/status/StatusCard.vue @@ -168,11 +168,11 @@ const showReplyTo = $computed(() => !replyToMain && !directReply)

- + - +
diff --git a/components/status/StatusPreviewCard.vue b/components/status/StatusPreviewCard.vue index 9df7ced7..b8edb7c6 100644 --- a/components/status/StatusPreviewCard.vue +++ b/components/status/StatusPreviewCard.vue @@ -46,6 +46,7 @@ const cardTypeIconMap: Record = { 'rounded-lg border border-base': !root, }" target="_blank" + external >
{
- + - +
diff --git a/components/timeline/TimelinePaginator.vue b/components/timeline/TimelinePaginator.vue index c3146093..723fa1b2 100644 --- a/components/timeline/TimelinePaginator.vue +++ b/components/timeline/TimelinePaginator.vue @@ -41,14 +41,14 @@ const showOriginSite = $computed(() => diff --git a/components/user/UserSignIn.vue b/components/user/UserSignIn.vue index 0c9af5d4..e4138ee7 100644 --- a/components/user/UserSignIn.vue +++ b/components/user/UserSignIn.vue @@ -175,7 +175,7 @@ onClickOutside($$(input), () => {
- {{ $t('user.tip_register_account') }} + {{ $t('user.tip_register_account') }}