diff options
| author | dakkar <dakkar@thenautilus.net> | 2024-06-13 07:58:28 +0000 |
|---|---|---|
| committer | dakkar <dakkar@thenautilus.net> | 2024-06-13 07:58:28 +0000 |
| commit | 853058e78d36a5345bc27ea221a1603674e84f97 (patch) | |
| tree | d3212126e61efd5e19f80dee284bb14cd44c61b4 /packages/frontend/src/components/MkNoteDetailed.vue | |
| parent | merge: Choosing search engines for search mfm (!547) (diff) | |
| parent | use configured boost visibility, instead of note's (diff) | |
| download | sharkey-853058e78d36a5345bc27ea221a1603674e84f97.tar.gz sharkey-853058e78d36a5345bc27ea221a1603674e84f97.tar.bz2 sharkey-853058e78d36a5345bc27ea221a1603674e84f97.zip | |
merge: tweak the rate limit for `notes/create` and other improvements (!548)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/548
Closes #467 and #468
Approved-by: fEmber <acomputerdog@gmail.com>
Approved-by: Marie <marie@kaifa.ch>
Diffstat (limited to 'packages/frontend/src/components/MkNoteDetailed.vue')
| -rw-r--r-- | packages/frontend/src/components/MkNoteDetailed.vue | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index 55a3ff8a16..f9fb6066c8 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -342,7 +342,7 @@ let renoting = false; const keymap = { 'r': () => reply(true), 'e|a|plus': () => react(true), - '(q)': () => { if (canRenote && !renoted.value && !renoting) { renoting = true; renote(appearNote.value.visibility) } }, + '(q)': () => { if (canRenote.value && !renoted.value && !renoting) renote(defaultStore.state.visibilityOnBoost); }, 'esc': blur, 'm|o': () => showMenu(true), 's': () => showContent.value !== showContent.value, @@ -434,6 +434,8 @@ useTooltip(quoteButton, async (showing) => { }); function boostVisibility() { + if (renoting) return; + if (!defaultStore.state.showVisibilitySelectorOnBoost) { renote(defaultStore.state.visibilityOnBoost); } else { @@ -445,6 +447,8 @@ function renote(visibility: Visibility, localOnly: boolean = false) { pleaseLogin(); showMovedDialog(); + renoting = true; + if (appearNote.value.channel) { const el = renoteButton.value as HTMLElement | null | undefined; if (el) { @@ -460,7 +464,7 @@ function renote(visibility: Visibility, localOnly: boolean = false) { }).then(() => { os.toast(i18n.ts.renoted); renoted.value = true; - }).finally(() => { renoting = false }); + }).finally(() => { renoting = false; }); } else if (!appearNote.value.channel || appearNote.value.channel.allowRenoteToExternal) { const el = renoteButton.value as HTMLElement | null | undefined; if (el) { @@ -477,7 +481,7 @@ function renote(visibility: Visibility, localOnly: boolean = false) { }).then(() => { os.toast(i18n.ts.renoted); renoted.value = true; - }).finally(() => { renoting = false }); + }).finally(() => { renoting = false; }); } } |