Revert "MkNote DblClick to expand"

This reverts commit ad6ef6856f.
This commit is contained in:
fly_mc 2024-10-18 13:20:46 +08:00
parent 68dd83575f
commit b7db339d8f

View file

@ -45,7 +45,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkAvatar :class="$style.collapsedRenoteTargetAvatar" :user="appearNote.user" link preview/> <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.stop="renoteCollapsed = false"/> <Mfm :text="getNoteSummary(appearNote)" :plain="true" :nowrap="true" :author="appearNote.user" :nyaize="'respect'" :class="$style.collapsedRenoteTargetText" @click.stop="renoteCollapsed = false"/>
</div> </div>
<article v-else :class="$style.article" @dblclick.stop="noteDblClick" @contextmenu.stop="onContextmenu"> <article v-else :class="$style.article" @contextmenu.stop="onContextmenu">
<div style="display: flex; padding-bottom: 10px;"> <div style="display: flex; padding-bottom: 10px;">
<div v-if="appearNote.channel" :class="$style.colorBar" :style="{ background: appearNote.channel.color }"></div> <div v-if="appearNote.channel" :class="$style.colorBar" :style="{ background: appearNote.channel.color }"></div>
<MkAvatar :class="$style.avatar" :user="appearNote.user" :link="!mock" :preview="!mock"/> <MkAvatar :class="$style.avatar" :user="appearNote.user" :link="!mock" :preview="!mock"/>
@ -220,8 +220,6 @@ import { type Keymap } from '@/scripts/hotkey.js';
import { focusPrev, focusNext } from '@/scripts/focus.js'; import { focusPrev, focusNext } from '@/scripts/focus.js';
import { getAppearNote } from '@/scripts/get-appear-note.js'; import { getAppearNote } from '@/scripts/get-appear-note.js';
import { miLocalStorage } from '@/local-storage.js'; import { miLocalStorage } from '@/local-storage.js';
import { useRouter } from '@/router/supplier.js';
import { notePage } from '@/filters/note.js';
import detectLanguage from '@/scripts/detect-language.js'; import detectLanguage from '@/scripts/detect-language.js';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
@ -289,7 +287,6 @@ const translation = ref<Misskey.entities.NotesTranslateResponse | null>(null);
const translating = ref(false); const translating = ref(false);
const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.value.user.instance); const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.value.user.instance);
const canRenote = computed(() => ['public', 'home'].includes(appearNote.value.visibility) || (appearNote.value.visibility === 'followers' && appearNote.value.userId === $i?.id)); const canRenote = computed(() => ['public', 'home'].includes(appearNote.value.visibility) || (appearNote.value.visibility === 'followers' && appearNote.value.userId === $i?.id));
const router = useRouter();
const renoteCollapsed = ref( const renoteCollapsed = ref(
defaultStore.state.collapseRenotes && isRenote && ( defaultStore.state.collapseRenotes && isRenote && (
($i && ($i.id === note.value.userId || $i.id === appearNote.value.userId)) || // `||` must be `||`! See https://github.com/misskey-dev/misskey/issues/13131 ($i && ($i.id === note.value.userId || $i.id === appearNote.value.userId)) || // `||` must be `||`! See https://github.com/misskey-dev/misskey/issues/13131
@ -434,11 +431,6 @@ if (!props.mock) {
} }
} }
function noteDblClick(ev: MouseEvent) {
if (window.getSelection()?.toString() !== '') ev.stopPropagation();
else router.push(notePage(appearNote.value));
}
function renote(viaKeyboard = false) { function renote(viaKeyboard = false) {
pleaseLogin(undefined, pleaseLoginContext.value); pleaseLogin(undefined, pleaseLoginContext.value);
showMovedDialog(); showMovedDialog();