From 0198a2bf43697c7e397513439116fdbba259bbbd Mon Sep 17 00:00:00 2001 From: TAKAHASHI Shuuji Date: Fri, 26 Dec 2025 02:06:32 +0900 Subject: [PATCH] feat: support quote post (#3443) --- app/components/list/ListEntry.vue | 1 - .../magickeys/MagickeysKeyboardShortcuts.vue | 4 + app/components/modal/ModalContainer.vue | 12 +- .../publish/PublishQuoteApprovalPicker.vue | 42 ++++++ app/components/publish/PublishThreadTools.vue | 2 +- .../publish/PublishVisibilityPicker.vue | 4 +- app/components/publish/PublishWidget.vue | 65 ++++++++- .../publish/PublishWidgetFull.client.vue | 15 +- app/components/publish/PublishWidgetList.vue | 2 +- app/components/status/StatusActions.vue | 23 +++ app/components/status/StatusActionsMore.vue | 8 +- app/components/status/StatusBody.vue | 3 + app/components/status/StatusCard.vue | 4 +- app/components/status/StatusContent.vue | 7 +- app/components/status/StatusDetails.vue | 5 +- app/components/status/StatusQuote.vue | 134 ++++++++++++++++++ ...ritedBoostedBy.vue => StatusReactedBy.vue} | 23 ++- app/composables/dialog.ts | 16 +-- app/composables/masto/icons.ts | 25 +++- app/composables/masto/publish.ts | 2 + app/composables/masto/status.ts | 24 +++- app/composables/masto/statusDrafts.ts | 56 ++++++-- app/composables/settings/definition.ts | 2 + app/composables/thread.ts | 4 +- app/pages/intent/post.vue | 1 + app/pages/settings/preferences/index.vue | 6 + app/plugins/magic-keys.client.ts | 9 ++ locales/en.json | 17 +++ locales/ja-JP.json | 22 +++ package.json | 2 +- pnpm-lock.yaml | 10 +- shared/types/index.ts | 7 +- 32 files changed, 488 insertions(+), 69 deletions(-) create mode 100644 app/components/publish/PublishQuoteApprovalPicker.vue create mode 100644 app/components/status/StatusQuote.vue rename app/components/status/{StatusFavouritedBoostedBy.vue => StatusReactedBy.vue} (63%) diff --git a/app/components/list/ListEntry.vue b/app/components/list/ListEntry.vue index 062ce8c8..1096c78e 100644 --- a/app/components/list/ListEntry.vue +++ b/app/components/list/ListEntry.vue @@ -71,7 +71,6 @@ async function removeList() { if (confirmDelete.choice === 'confirm') { await nextTick() try { - // @ts-expect-error this method should not take any argument, but it expects 1-2 arguments since masto.js v7.7.0 (potential issue) await client.v1.lists.$select(list.value.id).remove() emit('listRemoved', list.value.id) } diff --git a/app/components/magickeys/MagickeysKeyboardShortcuts.vue b/app/components/magickeys/MagickeysKeyboardShortcuts.vue index e5b1f4c9..de620213 100644 --- a/app/components/magickeys/MagickeysKeyboardShortcuts.vue +++ b/app/components/magickeys/MagickeysKeyboardShortcuts.vue @@ -117,6 +117,10 @@ const shortcutItemGroups = computed(() => [ description: t('magic_keys.groups.actions.boost'), shortcut: { keys: ['b'], isSequence: false }, }, + { + description: t('magic_keys.groups.actions.quote'), + shortcut: { keys: ['q'], isSequence: false }, + }, ], }, { diff --git a/app/components/modal/ModalContainer.vue b/app/components/modal/ModalContainer.vue index a8fb7896..55f3736a 100644 --- a/app/components/modal/ModalContainer.vue +++ b/app/components/modal/ModalContainer.vue @@ -6,11 +6,11 @@ import { isConfirmDialogOpen, isEditHistoryDialogOpen, isErrorDialogOpen, - isFavouritedBoostedByDialogOpen, isKeyboardShortcutsDialogOpen, isMediaPreviewOpen, isPreviewHelpOpen, isPublishDialogOpen, + isReactedByDialogOpen, isReportDialogOpen, isSigninDialogOpen, } from '~/composables/dialog' @@ -48,8 +48,8 @@ function handleConfirmChoice(choice: ConfirmDialogChoice) { isConfirmDialogOpen.value = false } -function handleFavouritedBoostedByClose() { - isFavouritedBoostedByDialogOpen.value = false +function handleReactedByClose() { + isReactedByDialogOpen.value = false } @@ -95,11 +95,11 @@ function handleFavouritedBoostedByClose() { - + diff --git a/app/components/publish/PublishQuoteApprovalPicker.vue b/app/components/publish/PublishQuoteApprovalPicker.vue new file mode 100644 index 00000000..143dd37f --- /dev/null +++ b/app/components/publish/PublishQuoteApprovalPicker.vue @@ -0,0 +1,42 @@ + + + diff --git a/app/components/publish/PublishThreadTools.vue b/app/components/publish/PublishThreadTools.vue index 1850392e..65b67ae3 100644 --- a/app/components/publish/PublishThreadTools.vue +++ b/app/components/publish/PublishThreadTools.vue @@ -1,6 +1,6 @@ diff --git a/app/components/publish/PublishWidget.vue b/app/components/publish/PublishWidget.vue index a9ea5557..79549410 100644 --- a/app/components/publish/PublishWidget.vue +++ b/app/components/publish/PublishWidget.vue @@ -1,5 +1,5 @@ @@ -194,10 +194,10 @@ function showFavoritedAndBoostedBy() { () const { translation } = await useTranslation(status, getLanguageCode()) @@ -38,6 +40,7 @@ const vnode = computed(() => {
+