From 5c8f75b9b79d38e0e6204dda75ea82ee0fd7b3fe 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: Sun, 8 Jan 2023 14:21:09 +0800 Subject: [PATCH] refactor: upgrade masto 5 (#867) --- components/account/AccountAvatar.vue | 4 +- components/account/AccountBigAvatar.vue | 4 +- components/account/AccountBigCard.vue | 5 +- components/account/AccountCard.vue | 4 +- components/account/AccountDisplayName.vue | 4 +- components/account/AccountFollowButton.vue | 12 +- components/account/AccountHandle.vue | 4 +- components/account/AccountHeader.vue | 12 +- components/account/AccountHoverCard.vue | 4 +- components/account/AccountHoverWrapper.vue | 4 +- components/account/AccountInfo.vue | 4 +- components/account/AccountInlineInfo.vue | 4 +- components/account/AccountMoreButton.vue | 12 +- components/account/AccountMoved.vue | 11 +- components/account/AccountPaginator.vue | 4 +- components/account/AccountPostsFollowers.vue | 4 +- components/common/CommonPaginator.vue | 2 +- components/common/CommonTrending.vue | 4 +- components/common/CommonTrendingCharts.vue | 4 +- components/content/ContentRich.setup.ts | 4 +- components/conversation/ConversationCard.vue | 4 +- .../conversation/ConversationPaginator.vue | 4 +- components/modal/ModalContainer.vue | 4 +- .../modal/ModalMediaPreviewCarousel.vue | 4 +- components/notification/NotificationCard.vue | 4 +- .../notification/NotificationPaginator.vue | 15 +- components/publish/PublishAttachment.vue | 4 +- components/publish/PublishWidget.vue | 22 +-- components/search/SearchAccountInfo.vue | 4 +- components/search/SearchHashtagInfo.vue | 4 +- .../settings/SettingsProfileMetadata.vue | 4 +- components/status/StatusAccountDetails.vue | 4 +- components/status/StatusActions.vue | 4 +- components/status/StatusActionsMore.vue | 14 +- components/status/StatusAttachment.vue | 6 +- components/status/StatusBody.vue | 4 +- components/status/StatusCard.vue | 14 +- components/status/StatusContent.vue | 6 +- components/status/StatusDetails.vue | 4 +- components/status/StatusMedia.vue | 4 +- components/status/StatusPoll.vue | 6 +- components/status/StatusPreviewCard.vue | 6 +- components/status/StatusPreviewCardInfo.vue | 4 +- components/status/StatusPreviewGitHub.vue | 4 +- components/status/StatusReplyingTo.vue | 4 +- components/status/edit/StatusEditHistory.vue | 8 +- .../status/edit/StatusEditIndicator.vue | 4 +- components/status/edit/StatusEditPreview.vue | 4 +- components/tag/TagActionButton.vue | 10 +- components/tag/TagCard.vue | 4 +- components/timeline/TimelineBlocks.vue | 2 +- components/timeline/TimelineBookmarks.vue | 2 +- components/timeline/TimelineConversations.vue | 2 +- components/timeline/TimelineDomainBlocks.vue | 4 +- components/timeline/TimelineFavourites.vue | 2 +- components/timeline/TimelineHome.vue | 4 +- components/timeline/TimelineList.vue | 4 +- components/timeline/TimelineMentions.vue | 4 +- components/timeline/TimelineMutes.vue | 2 +- components/timeline/TimelineNotifications.vue | 4 +- components/timeline/TimelinePaginator.vue | 8 +- components/timeline/TimelinePinned.vue | 2 +- components/timeline/TimelinePublic.vue | 4 +- components/timeline/TimelinePublicLocal.vue | 4 +- components/tiptap/TiptapHashtagList.vue | 4 +- components/tiptap/TiptapMentionList.vue | 4 +- composables/cache.ts | 30 ++-- composables/content-parse.ts | 8 +- composables/dialog.ts | 12 +- composables/emojis.ts | 10 +- composables/masto/account.ts | 18 +-- composables/masto/relationship.ts | 10 +- composables/masto/routes.ts | 14 +- composables/masto/search.ts | 16 +- composables/masto/status.ts | 18 +-- composables/masto/statusDrafts.ts | 12 +- composables/masto/translate.ts | 6 +- composables/misc.ts | 4 +- composables/paginator.ts | 4 +- .../createPushSubscription.ts | 20 +-- composables/push-notifications/types.ts | 12 +- .../push-notifications/usePushManager.ts | 8 +- composables/status.ts | 4 +- composables/timeline.ts | 6 +- composables/tiptap/suggestion.ts | 4 +- composables/users.ts | 46 +++--- middleware/permalink.global.ts | 2 +- nuxt.config.ts | 3 - package.json | 2 +- pages/[[server]]/@[account]/[status].vue | 2 +- .../[[server]]/@[account]/index/followers.vue | 2 +- .../[[server]]/@[account]/index/following.vue | 2 +- pages/[[server]]/@[account]/index/index.vue | 2 +- pages/[[server]]/@[account]/index/media.vue | 2 +- .../@[account]/index/with_replies.vue | 2 +- pages/[[server]]/explore/index.vue | 2 +- pages/[[server]]/explore/links.vue | 2 +- pages/[[server]]/explore/tags.vue | 2 +- pages/[[server]]/explore/users.vue | 2 +- pages/[[server]]/tags/[tag].vue | 6 +- pages/intent/post.vue | 4 +- pages/settings/profile/appearance.vue | 4 +- pnpm-lock.yaml | 149 ++++++++++-------- service-worker/types.ts | 24 +-- tests/content-rich.test.ts | 4 +- tests/html-parse.test.ts | 4 +- tests/reorder-timeline.test.ts | 14 +- types/index.ts | 32 ++-- 108 files changed, 438 insertions(+), 445 deletions(-) diff --git a/components/account/AccountAvatar.vue b/components/account/AccountAvatar.vue index e12e658e..4a4c50aa 100644 --- a/components/account/AccountAvatar.vue +++ b/components/account/AccountAvatar.vue @@ -1,8 +1,8 @@ diff --git a/components/account/AccountBigCard.vue b/components/account/AccountBigCard.vue index caaf3ba0..1abab8ce 100644 --- a/components/account/AccountBigCard.vue +++ b/components/account/AccountBigCard.vue @@ -1,7 +1,8 @@ diff --git a/components/account/AccountFollowButton.vue b/components/account/AccountFollowButton.vue index 3b4f5239..28781266 100644 --- a/components/account/AccountFollowButton.vue +++ b/components/account/AccountFollowButton.vue @@ -1,9 +1,9 @@ diff --git a/components/account/AccountMoved.vue b/components/account/AccountMoved.vue index ac3b79e4..75160514 100644 --- a/components/account/AccountMoved.vue +++ b/components/account/AccountMoved.vue @@ -1,10 +1,8 @@ @@ -16,9 +14,8 @@ defineProps<{
- - - + +
diff --git a/components/account/AccountPaginator.vue b/components/account/AccountPaginator.vue index bc3bc677..3832b887 100644 --- a/components/account/AccountPaginator.vue +++ b/components/account/AccountPaginator.vue @@ -1,8 +1,8 @@ diff --git a/components/account/AccountPostsFollowers.vue b/components/account/AccountPostsFollowers.vue index d558a4c3..aa3562fa 100644 --- a/components/account/AccountPostsFollowers.vue +++ b/components/account/AccountPostsFollowers.vue @@ -1,8 +1,8 @@ diff --git a/components/modal/ModalContainer.vue b/components/modal/ModalContainer.vue index 23c31c34..6f2be889 100644 --- a/components/modal/ModalContainer.vue +++ b/components/modal/ModalContainer.vue @@ -1,5 +1,5 @@ diff --git a/components/notification/NotificationPaginator.vue b/components/notification/NotificationPaginator.vue index 2116dd45..d5b9266a 100644 --- a/components/notification/NotificationPaginator.vue +++ b/components/notification/NotificationPaginator.vue @@ -1,20 +1,19 @@ diff --git a/components/search/SearchHashtagInfo.vue b/components/search/SearchHashtagInfo.vue index 4d3fe3bc..eb8f76eb 100644 --- a/components/search/SearchHashtagInfo.vue +++ b/components/search/SearchHashtagInfo.vue @@ -1,8 +1,8 @@ diff --git a/components/status/StatusActions.vue b/components/status/StatusActions.vue index b56810d5..8eb66932 100644 --- a/components/status/StatusActions.vue +++ b/components/status/StatusActions.vue @@ -1,8 +1,8 @@ diff --git a/components/status/StatusPoll.vue b/components/status/StatusPoll.vue index 1f32f0fe..dd82092e 100644 --- a/components/status/StatusPoll.vue +++ b/components/status/StatusPoll.vue @@ -1,8 +1,8 @@ diff --git a/components/tag/TagActionButton.vue b/components/tag/TagActionButton.vue index 3bd13d60..aab26f16 100644 --- a/components/tag/TagActionButton.vue +++ b/components/tag/TagActionButton.vue @@ -1,21 +1,21 @@