From cc8480e8eade04549e63c98bbc53815c2f771e27 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 30 Mar 2025 20:52:07 +0300 Subject: [PATCH 1/3] fix disabled state not applying --- src/components/status_action_buttons/action_button.js | 1 + src/components/status_action_buttons/action_button.vue | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/status_action_buttons/action_button.js b/src/components/status_action_buttons/action_button.js index 07affaafe..8a65b9184 100644 --- a/src/components/status_action_buttons/action_button.js +++ b/src/components/status_action_buttons/action_button.js @@ -124,6 +124,7 @@ export default { } }, doActionWrap (button, close = () => {}) { + if (this.button.interactive ? !this.button.interactive(this.funcArg) : false) return this.$emit('interacted') if (button.name === 'emoji') { this.$refs.picker.showPicker() diff --git a/src/components/status_action_buttons/action_button.vue b/src/components/status_action_buttons/action_button.vue index ec13bd8bf..79082052a 100644 --- a/src/components/status_action_buttons/action_button.vue +++ b/src/components/status_action_buttons/action_button.vue @@ -12,7 +12,7 @@ :title="$t(button.label(funcArg))" target="_blank" :tabindex="0" - :disabled="buttonClass.disabled" + :disabled="this.button.interactive ? !this.button.interactive(this.funcArg) : false" :href="getComponent(button) == 'a' ? button.link?.(funcArg) || remoteInteractionLink : undefined" @click="doActionWrap(button, outerClose)" > From 24427de6e75a6e2b10398371ba00b406705f5afd Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 30 Mar 2025 20:57:22 +0300 Subject: [PATCH 2/3] allow repeats of own private-ish statuses --- src/components/status_action_buttons/buttons_definitions.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/status_action_buttons/buttons_definitions.js b/src/components/status_action_buttons/buttons_definitions.js index ecd4def70..bc1e45a98 100644 --- a/src/components/status_action_buttons/buttons_definitions.js +++ b/src/components/status_action_buttons/buttons_definitions.js @@ -30,8 +30,8 @@ export const BUTTONS = [{ label: ({ status }) => status.repeated ? 'tool_tip.unrepeat' : 'tool_tip.repeat', - icon ({ status }) { - if (PRIVATE_SCOPES.has(status.visibility)) { + icon ({ status, currentUser }) { + if (currentUser.id !== status.user.id && PRIVATE_SCOPES.has(status.visibility)) { return 'lock' } return 'retweet' @@ -40,7 +40,7 @@ export const BUTTONS = [{ active: ({ status }) => status.repeated, counter: ({ status }) => status.repeat_num, anonLink: true, - interactive: ({ status, loggedIn }) => loggedIn && !PRIVATE_SCOPES.has(status.visibility), + interactive: ({ status, currentUser }) => !!currentUser && (currentUser.id === status.user.id || !PRIVATE_SCOPES.has(status.visibility)), toggleable: true, confirm: ({ status, getters }) => !status.repeated && getters.mergedConfig.modalOnRepeat, confirmStrings: { From 0653636b2777dde9ad88c8d222ea11430b65e57a Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 30 Mar 2025 20:58:50 +0300 Subject: [PATCH 3/3] changelog --- changelog.d/selfreproot.fix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/selfreproot.fix diff --git a/changelog.d/selfreproot.fix b/changelog.d/selfreproot.fix new file mode 100644 index 000000000..4c3faa838 --- /dev/null +++ b/changelog.d/selfreproot.fix @@ -0,0 +1 @@ +Allow repeats of own posts with private scopes