From 1a333aabba759fb68449ead9c47e986f456e8c8c Mon Sep 17 00:00:00 2001 From: Sean King Date: Tue, 7 Jun 2022 21:31:48 -0600 Subject: Add edit status functionality --- src/components/extra_buttons/extra_buttons.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/components/extra_buttons/extra_buttons.js') diff --git a/src/components/extra_buttons/extra_buttons.js b/src/components/extra_buttons/extra_buttons.js index dd45b6b9..9508a707 100644 --- a/src/components/extra_buttons/extra_buttons.js +++ b/src/components/extra_buttons/extra_buttons.js @@ -71,6 +71,19 @@ const ExtraButtons = { }, reportStatus () { this.$store.dispatch('openUserReportingModal', { userId: this.status.user.id, statusIds: [this.status.id] }) + }, + editStatus () { + this.$store.dispatch('fetchStatusSource', { id: this.status.id }) + .then(data => this.$store.dispatch('openEditStatusModal', { + statusId: this.status.id, + subject: data.spoiler_text, + statusText: data.text, + statusIsSensitive: this.status.nsfw, + statusPoll: this.status.poll, + statusFiles: this.status.attachments, + visibility: this.status.visibility, + statusContentType: data.content_type + })) } }, computed: { -- cgit v1.2.3-70-g09d2 From 32ecdfdd8738befa004f865f496b7df17a4c2030 Mon Sep 17 00:00:00 2001 From: Sean King Date: Sat, 11 Jun 2022 16:38:03 -0600 Subject: Don't pollute the original timeline when new media attachment is added --- src/components/extra_buttons/extra_buttons.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/components/extra_buttons/extra_buttons.js') diff --git a/src/components/extra_buttons/extra_buttons.js b/src/components/extra_buttons/extra_buttons.js index 9508a707..8a703953 100644 --- a/src/components/extra_buttons/extra_buttons.js +++ b/src/components/extra_buttons/extra_buttons.js @@ -80,7 +80,7 @@ const ExtraButtons = { statusText: data.text, statusIsSensitive: this.status.nsfw, statusPoll: this.status.poll, - statusFiles: this.status.attachments, + statusFiles: [...this.status.attachments], visibility: this.status.visibility, statusContentType: data.content_type })) -- cgit v1.2.3-70-g09d2 From e6ed00ea1cb526cbd57b4faef95dcc57b5b73a54 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 21 Jun 2022 01:24:50 +0300 Subject: don't show bookmark button for anon visitors --- src/components/extra_buttons/extra_buttons.js | 3 ++ src/components/extra_buttons/extra_buttons.vue | 46 ++++++++++++++------------ 2 files changed, 27 insertions(+), 22 deletions(-) (limited to 'src/components/extra_buttons/extra_buttons.js') diff --git a/src/components/extra_buttons/extra_buttons.js b/src/components/extra_buttons/extra_buttons.js index dd45b6b9..2f534896 100644 --- a/src/components/extra_buttons/extra_buttons.js +++ b/src/components/extra_buttons/extra_buttons.js @@ -89,6 +89,9 @@ const ExtraButtons = { canMute () { return !!this.currentUser }, + canBookmark () { + return !!this.currentUser + }, statusLink () { return `${this.$store.state.instance.server}${this.$router.resolve({ name: 'conversation', params: { id: this.status.id } }).href}` } diff --git a/src/components/extra_buttons/extra_buttons.vue b/src/components/extra_buttons/extra_buttons.vue index cafba470..2ea86201 100644 --- a/src/components/extra_buttons/extra_buttons.vue +++ b/src/components/extra_buttons/extra_buttons.vue @@ -51,28 +51,30 @@ icon="thumbtack" />{{ $t("status.unpin") }} - - + +