From dfdf95da61f2c612172b9c1418c1756569dae6a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90?= Date: Fri, 25 Nov 2022 19:39:21 +0800 Subject: [PATCH] feat(account): more actions for user --- components/account/AccountHeader.vue | 6 +- components/account/AccountMoreButton.vue | 77 ++++++++++++++++++++++++ components/publish/PublishWidget.vue | 2 +- components/status/StatusActions.vue | 23 ++----- composables/statusDrafts.ts | 25 ++++++-- 5 files changed, 105 insertions(+), 28 deletions(-) create mode 100644 components/account/AccountMoreButton.vue diff --git a/components/account/AccountHeader.vue b/components/account/AccountHeader.vue index 0aadff04..65fd38bf 100644 --- a/components/account/AccountHeader.vue +++ b/components/account/AccountHeader.vue @@ -64,16 +64,12 @@ function getFieldNameIcon(fieldName: string) {
+
diff --git a/components/account/AccountMoreButton.vue b/components/account/AccountMoreButton.vue new file mode 100644 index 00000000..b2537416 --- /dev/null +++ b/components/account/AccountMoreButton.vue @@ -0,0 +1,77 @@ + + + diff --git a/components/publish/PublishWidget.vue b/components/publish/PublishWidget.vue index c78e3fcf..ffb41269 100644 --- a/components/publish/PublishWidget.vue +++ b/components/publish/PublishWidget.vue @@ -89,7 +89,7 @@ async function publish() { await masto.statuses.create(status) else await masto.statuses.update(draft.editingStatus.id, status) - draft = getDefaultDraft(inReplyToId) + draft = getDefaultDraft({ inReplyToId }) isPublishDialogOpen.value = false } finally { diff --git a/components/status/StatusActions.vue b/components/status/StatusActions.vue index 352e27a0..18e891df 100644 --- a/components/status/StatusActions.vue +++ b/components/status/StatusActions.vue @@ -77,9 +77,6 @@ const toggleTranslation = async () => { const copyLink = async () => { await clipboard.copy(`${location.origin}${getStatusPath(status)}`) } -const openInOriginal = () => { - window.open(status.url!, '_blank') -} const deleteStatus = async () => { // TODO confirm to delete @@ -115,16 +112,6 @@ function editStatus() { attachments: [], }) } - -function mention() { - openPublishDialog({ - params: { - ...getParamsFromStatus(status), - status: `@${status.account.acct} `, - }, - attachments: [], - }) -}