summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/SkNote.vue
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2024-06-13 09:06:24 +0100
committerdakkar <dakkar@thenautilus.net>2024-06-13 09:06:24 +0100
commitb2cbd507fe35ad0b31b3b30fdaf180fbfcb1460e (patch)
tree725bb756aa65b3e809a49d426d7e01e194777270 /packages/frontend/src/components/SkNote.vue
parentmerge: add all missing English translations (!546) (diff)
parentmerge: tweak the rate limit for `notes/create` and other improvements (!548) (diff)
downloadsharkey-b2cbd507fe35ad0b31b3b30fdaf180fbfcb1460e.tar.gz
sharkey-b2cbd507fe35ad0b31b3b30fdaf180fbfcb1460e.tar.bz2
sharkey-b2cbd507fe35ad0b31b3b30fdaf180fbfcb1460e.zip
Merge branch 'develop' into future-2024-05-31
Diffstat (limited to 'packages/frontend/src/components/SkNote.vue')
-rw-r--r--packages/frontend/src/components/SkNote.vue13
1 files changed, 9 insertions, 4 deletions
diff --git a/packages/frontend/src/components/SkNote.vue b/packages/frontend/src/components/SkNote.vue
index d09f4c79ea..7cfa3542c3 100644
--- a/packages/frontend/src/components/SkNote.vue
+++ b/packages/frontend/src/components/SkNote.vue
@@ -44,7 +44,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
<div v-if="renoteCollapsed" :class="$style.collapsedRenoteTarget">
<MkAvatar :class="$style.collapsedRenoteTargetAvatar" :user="appearNote.user" link preview/>
- <Mfm :text="getNoteSummary(appearNote)" :plain="true" :nowrap="true" :author="appearNote.user" :nyaize="'respect'" :class="$style.collapsedRenoteTargetText" @click="renoteCollapsed = false"/>
+ <Mfm :text="getNoteSummary(appearNote)" :isBlock="true" :plain="true" :nowrap="true" :author="appearNote.user" :nyaize="'respect'" :class="$style.collapsedRenoteTargetText" @click="renoteCollapsed = false"/>
</div>
<article v-else :class="$style.article" @contextmenu.stop="onContextmenu">
<div style="display: flex; padding-bottom: 10px;">
@@ -57,7 +57,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<div :class="[{ [$style.clickToOpen]: defaultStore.state.clickToOpen }]" @click.stop="defaultStore.state.clickToOpen ? noteclick(appearNote.id) : undefined">
<div style="container-type: inline-size;">
<p v-if="appearNote.cw != null" :class="$style.cw">
- <Mfm v-if="appearNote.cw != ''" style="margin-right: 8px;" :text="appearNote.cw" :author="appearNote.user" :nyaize="'respect'"/>
+ <Mfm v-if="appearNote.cw != ''" style="margin-right: 8px;" :text="appearNote.cw" :isBlock="true" :author="appearNote.user" :nyaize="'respect'"/>
<MkCwButton v-model="showContent" :text="appearNote.text" :renote="appearNote.renote" :files="appearNote.files" :poll="appearNote.poll" style="margin: 4px 0;" @click.stop/>
</p>
<div v-show="appearNote.cw == null || showContent" :class="[{ [$style.contentCollapsed]: collapsed }]">
@@ -73,12 +73,13 @@ SPDX-License-Identifier: AGPL-3.0-only
:enableEmojiMenu="true"
:enableEmojiMenuReaction="true"
:isAnim="allowAnim"
+ :isBlock="true"
/>
<div v-if="translating || translation" :class="$style.translation">
<MkLoading v-if="translating" mini/>
<div v-else-if="translation">
<b>{{ i18n.tsx.translatedFrom({ x: translation.sourceLang }) }}: </b>
- <Mfm :text="translation.text" :author="appearNote.user" :nyaize="'respect'" :emojiUrls="appearNote.emojis"/>
+ <Mfm :text="translation.text" :isBlock="true" :author="appearNote.user" :nyaize="'respect'" :emojiUrls="appearNote.emojis"/>
</div>
</div>
<MkButton v-if="!allowAnim && animated" :class="$style.playMFMButton" :small="true" @click="animatedMFM()" @click.stop><i class="ph-play ph-bold ph-lg "></i> {{ i18n.ts._animatedMFM.play }}</MkButton>
@@ -340,7 +341,7 @@ let renoting = false;
const keymap = {
'r': () => reply(true),
'e|a|plus': () => react(true),
- '(q)': () => { if (canRenote.value && !renoted.value && !renoting) { renoting = true; renote(appearNote.value.visibility); } },
+ '(q)': () => { if (canRenote.value && !renoted.value && !renoting) renote(defaultStore.state.visibilityOnBoost); },
'up|k|shift+tab': focusBefore,
'down|j|tab': focusAfter,
'esc': blur,
@@ -440,6 +441,8 @@ if (!props.mock) {
}
function boostVisibility() {
+ if (renoting) return;
+
if (!defaultStore.state.showVisibilitySelectorOnBoost) {
renote(defaultStore.state.visibilityOnBoost);
} else {
@@ -451,6 +454,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) {