2023-12-02 12:09:25 +00:00
|
|
|
<!--
|
|
|
|
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<div
|
2024-01-21 12:11:23 +00:00
|
|
|
v-if="!hardMuted && muted === false"
|
2023-12-02 12:09:25 +00:00
|
|
|
v-show="!isDeleted"
|
2024-02-03 20:29:46 +00:00
|
|
|
ref="rootEl"
|
2023-12-02 12:09:25 +00:00
|
|
|
v-hotkey="keymap"
|
|
|
|
:class="[$style.root, { [$style.showActionsOnlyHover]: defaultStore.state.showNoteActionsOnlyHover }]"
|
|
|
|
:tabindex="!isDeleted ? '-1' : undefined"
|
|
|
|
>
|
|
|
|
<SkNoteSub v-if="appearNote.reply && !renoteCollapsed" :note="appearNote.reply" :class="$style.replyTo"/>
|
|
|
|
<div v-if="pinned" :class="$style.tip"><i class="ph-push-pin ph-bold ph-lg"></i> {{ i18n.ts.pinnedNote }}</div>
|
|
|
|
<!--<div v-if="appearNote._prId_" class="tip"><i class="ph-megaphone ph-bold ph-lg"></i> {{ i18n.ts.promotion }}<button class="_textButton hide" @click="readPromo()">{{ i18n.ts.hideThisNote }} <i class="ph-x ph-bold ph-lg"></i></button></div>-->
|
|
|
|
<!--<div v-if="appearNote._featuredId_" class="tip"><i class="ph-lightning ph-bold ph-lg"></i> {{ i18n.ts.featured }}</div>-->
|
|
|
|
<div v-if="isRenote" :class="$style.renote">
|
|
|
|
<div v-if="note.channel" :class="$style.colorBar" :style="{ background: note.channel.color }"></div>
|
|
|
|
<MkAvatar :class="$style.renoteAvatar" :user="note.user" link preview/>
|
|
|
|
<i class="ph-rocket-launch ph-bold ph-lg" style="margin-right: 4px;"></i>
|
|
|
|
<I18n :src="i18n.ts.renotedBy" tag="span" :class="$style.renoteText">
|
|
|
|
<template #user>
|
|
|
|
<MkA v-user-preview="note.userId" :class="$style.renoteUserName" :to="userPage(note.user)">
|
|
|
|
<MkUserName :user="note.user"/>
|
|
|
|
</MkA>
|
|
|
|
</template>
|
|
|
|
</I18n>
|
|
|
|
<div :class="$style.renoteInfo">
|
|
|
|
<button ref="renoteTime" :class="$style.renoteTime" class="_button" @click="showRenoteMenu()">
|
|
|
|
<i class="ph-dots-three ph-bold ph-lg" :class="$style.renoteMenu"></i>
|
|
|
|
<MkTime :time="note.createdAt"/>
|
|
|
|
</button>
|
|
|
|
<span v-if="note.visibility !== 'public'" style="margin-left: 0.5em;" :title="i18n.ts._visibility[note.visibility]">
|
|
|
|
<i v-if="note.visibility === 'home'" class="ph-house ph-bold ph-lg"></i>
|
|
|
|
<i v-else-if="note.visibility === 'followers'" class="ph-lock ph-bold ph-lg"></i>
|
|
|
|
<i v-else-if="note.visibility === 'specified'" ref="specified" class="ph-envelope ph-bold ph-lg"></i>
|
|
|
|
</span>
|
|
|
|
<span v-if="note.localOnly" style="margin-left: 0.5em;" :title="i18n.ts._visibility['disableFederation']"><i class="ph-rocket ph-bold ph-lg"></i></span>
|
|
|
|
<span v-if="note.channel" style="margin-left: 0.5em;" :title="note.channel.name"><i class="ph-television ph-bold ph-lg"></i></span>
|
2024-02-05 11:39:15 +00:00
|
|
|
<span v-if="note.updatedAt" ref="menuVersionsButton" style="margin-left: 0.5em;" title="Edited" @mousedown="menuVersions()"><i class="ph-pencil-simple ph-bold ph-lg"></i></span>
|
2023-12-02 12:09:25 +00:00
|
|
|
</div>
|
|
|
|
</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"/>
|
|
|
|
</div>
|
|
|
|
<article v-else :class="$style.article" @contextmenu.stop="onContextmenu">
|
|
|
|
<div style="display: flex; padding-bottom: 10px;">
|
|
|
|
<div v-if="appearNote.channel" :class="$style.colorBar" :style="{ background: appearNote.channel.color }"></div>
|
|
|
|
<MkAvatar :class="[$style.avatar, { [$style.avatarReplyTo]: appearNote.reply }]" :user="appearNote.user" :link="!mock" :preview="!mock"/>
|
|
|
|
<div :class="$style.main">
|
|
|
|
<SkNoteHeader :note="appearNote" :mini="true"/>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-01-31 12:20:41 +00:00
|
|
|
<div :class="[{ [$style.clickToOpen]: defaultStore.state.clickToOpen }]" @click.stop="defaultStore.state.clickToOpen ? noteclick(appearNote.id) : undefined">
|
2023-12-02 12:09:25 +00:00
|
|
|
<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'"/>
|
2023-12-23 01:09:23 +00:00
|
|
|
<MkCwButton v-model="showContent" :text="appearNote.text" :renote="appearNote.renote" :files="appearNote.files" :poll="appearNote.poll" style="margin: 4px 0;" @click.stop/>
|
2023-12-02 12:09:25 +00:00
|
|
|
</p>
|
2023-12-23 01:09:23 +00:00
|
|
|
<div v-show="appearNote.cw == null || showContent" :class="[{ [$style.contentCollapsed]: collapsed }]">
|
2023-12-02 12:09:25 +00:00
|
|
|
<div :class="$style.text">
|
|
|
|
<span v-if="appearNote.isHidden" style="opacity: 0.5">({{ i18n.ts.private }})</span>
|
|
|
|
<Mfm
|
|
|
|
v-if="appearNote.text"
|
|
|
|
:parsedNodes="parsed"
|
|
|
|
:text="appearNote.text"
|
|
|
|
:author="appearNote.user"
|
|
|
|
:nyaize="'respect'"
|
|
|
|
:emojiUrls="appearNote.emojis"
|
|
|
|
:enableEmojiMenu="true"
|
|
|
|
:enableEmojiMenuReaction="true"
|
|
|
|
:isAnim="allowAnim"
|
|
|
|
/>
|
|
|
|
<div v-if="translating || translation" :class="$style.translation">
|
|
|
|
<MkLoading v-if="translating" mini/>
|
2024-02-03 20:29:46 +00:00
|
|
|
<div v-else-if="translation">
|
2024-01-21 12:11:23 +00:00
|
|
|
<b>{{ i18n.tsx.translatedFrom({ x: translation.sourceLang }) }}: </b>
|
2023-12-02 12:09:25 +00:00
|
|
|
<Mfm :text="translation.text" :author="appearNote.user" :nyaize="'respect'" :emojiUrls="appearNote.emojis"/>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-12-23 01:09:23 +00:00
|
|
|
<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>
|
|
|
|
<MkButton v-else-if="!defaultStore.state.animatedMfm && allowAnim && animated" :class="$style.playMFMButton" :small="true" @click="animatedMFM()" @click.stop><i class="ph-stop ph-bold ph-lg "></i> {{ i18n.ts._animatedMFM.stop }}</MkButton>
|
2023-12-02 12:09:25 +00:00
|
|
|
</div>
|
2024-02-03 19:19:44 +00:00
|
|
|
<div v-if="appearNote.files && appearNote.files.length > 0">
|
2023-12-23 01:09:23 +00:00
|
|
|
<MkMediaList :mediaList="appearNote.files" @click.stop/>
|
2023-12-02 12:09:25 +00:00
|
|
|
</div>
|
2024-02-03 19:19:44 +00:00
|
|
|
<MkPoll v-if="appearNote.poll" :noteId="appearNote.id" :poll="appearNote.poll" :class="$style.poll" @click.stop/>
|
2023-12-23 01:09:23 +00:00
|
|
|
<MkUrlPreview v-for="url in urls" :key="url" :url="url" :compact="true" :detail="false" :class="$style.urlPreview" @click.stop/>
|
2023-12-02 12:09:25 +00:00
|
|
|
<div v-if="appearNote.renote" :class="$style.quote"><SkNoteSimple :note="appearNote.renote" :class="$style.quoteNote"/></div>
|
2023-12-23 01:09:23 +00:00
|
|
|
<button v-if="isLong && collapsed" :class="$style.collapsed" class="_button" @click.stop @click="collapsed = false">
|
2023-12-02 12:09:25 +00:00
|
|
|
<span :class="$style.collapsedLabel">{{ i18n.ts.showMore }}</span>
|
|
|
|
</button>
|
2023-12-23 01:09:23 +00:00
|
|
|
<button v-else-if="isLong && !collapsed" :class="$style.showLess" class="_button" @click.stop @click="collapsed = true">
|
2023-12-02 12:09:25 +00:00
|
|
|
<span :class="$style.showLessLabel">{{ i18n.ts.showLess }}</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<MkA v-if="appearNote.channel && !inChannel" :class="$style.channel" :to="`/channels/${appearNote.channel.id}`"><i class="ph-television ph-bold ph-lg"></i> {{ appearNote.channel.name }}</MkA>
|
|
|
|
</div>
|
2023-12-23 01:09:23 +00:00
|
|
|
<MkReactionsViewer :note="appearNote" :maxNumber="16" @click.stop @mockUpdateMyReaction="emitUpdReaction">
|
2023-12-02 12:09:25 +00:00
|
|
|
<template #more>
|
|
|
|
<div :class="$style.reactionOmitted">{{ i18n.ts.more }}</div>
|
|
|
|
</template>
|
|
|
|
</MkReactionsViewer>
|
|
|
|
<footer :class="$style.footer">
|
2023-12-23 01:09:23 +00:00
|
|
|
<button :class="$style.footerButton" class="_button" @click.stop @click="reply()">
|
2023-12-02 12:09:25 +00:00
|
|
|
<i class="ph-arrow-u-up-left ph-bold ph-lg"></i>
|
|
|
|
<p v-if="appearNote.repliesCount > 0" :class="$style.footerButtonCount">{{ appearNote.repliesCount }}</p>
|
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
v-if="canRenote"
|
|
|
|
ref="renoteButton"
|
|
|
|
:class="$style.footerButton"
|
|
|
|
class="_button"
|
|
|
|
:style="renoted ? 'color: var(--accent) !important;' : ''"
|
2023-12-23 01:09:23 +00:00
|
|
|
@click.stop
|
2023-12-03 23:19:34 +00:00
|
|
|
@mousedown="renoted ? undoRenote(appearNote) : boostVisibility()"
|
2023-12-02 12:09:25 +00:00
|
|
|
>
|
|
|
|
<i class="ph-rocket-launch ph-bold ph-lg"></i>
|
|
|
|
<p v-if="appearNote.renoteCount > 0" :class="$style.footerButtonCount">{{ appearNote.renoteCount }}</p>
|
|
|
|
</button>
|
|
|
|
<button v-else :class="$style.footerButton" class="_button" disabled>
|
|
|
|
<i class="ph-prohibit ph-bold ph-lg"></i>
|
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
v-if="canRenote && !props.mock"
|
|
|
|
ref="quoteButton"
|
|
|
|
:class="$style.footerButton"
|
|
|
|
class="_button"
|
2023-12-23 01:09:23 +00:00
|
|
|
@click.stop
|
2023-12-02 12:09:25 +00:00
|
|
|
@mousedown="quote()"
|
|
|
|
>
|
|
|
|
<i class="ph-quotes ph-bold ph-lg"></i>
|
|
|
|
</button>
|
2023-12-23 01:09:23 +00:00
|
|
|
<button v-if="appearNote.myReaction == null && appearNote.reactionAcceptance !== 'likeOnly'" ref="likeButton" :class="$style.footerButton" class="_button" @click.stop @click="like()">
|
2023-12-02 12:09:25 +00:00
|
|
|
<i class="ph-heart ph-bold ph-lg"></i>
|
|
|
|
</button>
|
|
|
|
<button v-if="appearNote.myReaction == null" ref="reactButton" :class="$style.footerButton" class="_button" @mousedown="react()">
|
|
|
|
<i v-if="appearNote.reactionAcceptance === 'likeOnly'" class="ph-heart ph-bold ph-lg"></i>
|
|
|
|
<i v-else class="ph-smiley ph-bold ph-lg"></i>
|
|
|
|
</button>
|
2023-12-23 01:09:23 +00:00
|
|
|
<button v-if="appearNote.myReaction != null" ref="reactButton" :class="$style.footerButton" class="_button" @click.stop @click="undoReact(appearNote)">
|
2023-12-02 12:09:25 +00:00
|
|
|
<i class="ph-minus ph-bold ph-lg"></i>
|
|
|
|
</button>
|
|
|
|
<button v-if="defaultStore.state.showClipButtonInNoteFooter" ref="clipButton" :class="$style.footerButton" class="_button" @mousedown="clip()">
|
|
|
|
<i class="ph-paperclip ph-bold ph-lg"></i>
|
|
|
|
</button>
|
2024-02-03 19:19:44 +00:00
|
|
|
<button ref="menuButton" :class="$style.footerButton" class="_button" @mousedown="showMenu()">
|
2023-12-02 12:09:25 +00:00
|
|
|
<i class="ph-dots-three ph-bold ph-lg"></i>
|
|
|
|
</button>
|
|
|
|
</footer>
|
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
</div>
|
2023-12-23 01:09:23 +00:00
|
|
|
<div v-else-if="!hardMuted" :class="$style.muted" @click="muted = false">
|
2024-01-21 12:11:23 +00:00
|
|
|
<I18n v-if="muted === 'sensitiveMute'" :src="i18n.ts.userSaysSomethingSensitive" tag="small">
|
|
|
|
<template #name>
|
|
|
|
<MkA v-user-preview="appearNote.userId" :to="userPage(appearNote.user)">
|
|
|
|
<MkUserName :user="appearNote.user"/>
|
|
|
|
</MkA>
|
|
|
|
</template>
|
|
|
|
</I18n>
|
|
|
|
<I18n v-else :src="i18n.ts.userSaysSomething" tag="small">
|
2023-12-02 12:09:25 +00:00
|
|
|
<template #name>
|
|
|
|
<MkA v-user-preview="appearNote.userId" :to="userPage(appearNote.user)">
|
|
|
|
<MkUserName :user="appearNote.user"/>
|
|
|
|
</MkA>
|
|
|
|
</template>
|
|
|
|
</I18n>
|
|
|
|
</div>
|
2023-12-23 01:09:23 +00:00
|
|
|
<div v-else>
|
|
|
|
<!--
|
|
|
|
MkDateSeparatedList uses TransitionGroup which requires single element in the child elements
|
|
|
|
so MkNote create empty div instead of no elements
|
|
|
|
-->
|
|
|
|
</div>
|
2023-12-02 12:09:25 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
2023-12-23 01:09:23 +00:00
|
|
|
import { computed, inject, onMounted, ref, shallowRef, Ref, watch, provide } from 'vue';
|
2024-02-03 14:01:09 +00:00
|
|
|
import * as mfm from '@transfem-org/sfm-js';
|
2023-12-02 12:09:25 +00:00
|
|
|
import * as Misskey from 'misskey-js';
|
|
|
|
import SkNoteSub from '@/components/SkNoteSub.vue';
|
|
|
|
import SkNoteHeader from '@/components/SkNoteHeader.vue';
|
|
|
|
import SkNoteSimple from '@/components/SkNoteSimple.vue';
|
|
|
|
import MkReactionsViewer from '@/components/MkReactionsViewer.vue';
|
|
|
|
import MkMediaList from '@/components/MkMediaList.vue';
|
|
|
|
import MkCwButton from '@/components/MkCwButton.vue';
|
|
|
|
import MkPoll from '@/components/MkPoll.vue';
|
|
|
|
import MkUsersTooltip from '@/components/MkUsersTooltip.vue';
|
|
|
|
import MkUrlPreview from '@/components/MkUrlPreview.vue';
|
|
|
|
import MkButton from '@/components/MkButton.vue';
|
|
|
|
import { pleaseLogin } from '@/scripts/please-login.js';
|
|
|
|
import { focusPrev, focusNext } from '@/scripts/focus.js';
|
|
|
|
import { checkWordMute } from '@/scripts/check-word-mute.js';
|
|
|
|
import { userPage } from '@/filters/user.js';
|
|
|
|
import * as os from '@/os.js';
|
2024-01-09 01:57:57 +00:00
|
|
|
import { misskeyApi } from '@/scripts/misskey-api.js';
|
2023-12-23 01:09:23 +00:00
|
|
|
import * as sound from '@/scripts/sound.js';
|
2023-12-02 12:09:25 +00:00
|
|
|
import { defaultStore, noteViewInterruptors } from '@/store.js';
|
|
|
|
import { reactionPicker } from '@/scripts/reaction-picker.js';
|
|
|
|
import { extractUrlFromMfm } from '@/scripts/extract-url-from-mfm.js';
|
|
|
|
import { checkAnimationFromMfm } from '@/scripts/check-animated-mfm.js';
|
|
|
|
import { $i } from '@/account.js';
|
|
|
|
import { i18n } from '@/i18n.js';
|
|
|
|
import { getAbuseNoteMenu, getCopyNoteLinkMenu, getNoteClipMenu, getNoteMenu } from '@/scripts/get-note-menu.js';
|
|
|
|
import { getNoteVersionsMenu } from '@/scripts/get-note-versions-menu.js';
|
|
|
|
import { useNoteCapture } from '@/scripts/use-note-capture.js';
|
|
|
|
import { deepClone } from '@/scripts/clone.js';
|
|
|
|
import { useTooltip } from '@/scripts/use-tooltip.js';
|
|
|
|
import { claimAchievement } from '@/scripts/achievements.js';
|
|
|
|
import { getNoteSummary } from '@/scripts/get-note-summary.js';
|
|
|
|
import { MenuItem } from '@/types/menu.js';
|
|
|
|
import MkRippleEffect from '@/components/MkRippleEffect.vue';
|
|
|
|
import { showMovedDialog } from '@/scripts/show-moved-dialog.js';
|
|
|
|
import { shouldCollapsed } from '@/scripts/collapsed.js';
|
2024-02-03 19:19:44 +00:00
|
|
|
import { useRouter } from '@/router/supplier.js';
|
2023-12-02 12:09:25 +00:00
|
|
|
|
|
|
|
const props = withDefaults(defineProps<{
|
|
|
|
note: Misskey.entities.Note;
|
|
|
|
pinned?: boolean;
|
|
|
|
mock?: boolean;
|
2023-12-23 01:09:23 +00:00
|
|
|
withHardMute?: boolean;
|
2023-12-02 12:09:25 +00:00
|
|
|
}>(), {
|
|
|
|
mock: false,
|
|
|
|
});
|
|
|
|
|
|
|
|
provide('mock', props.mock);
|
|
|
|
|
|
|
|
const emit = defineEmits<{
|
|
|
|
(ev: 'reaction', emoji: string): void;
|
|
|
|
(ev: 'removeReaction', emoji: string): void;
|
|
|
|
}>();
|
|
|
|
|
|
|
|
const router = useRouter();
|
|
|
|
|
2024-01-21 12:11:23 +00:00
|
|
|
const inTimeline = inject<boolean>('inTimeline', false);
|
2023-12-02 12:09:25 +00:00
|
|
|
const inChannel = inject('inChannel', null);
|
|
|
|
const currentClip = inject<Ref<Misskey.entities.Clip> | null>('currentClip', null);
|
|
|
|
|
2023-12-23 01:09:23 +00:00
|
|
|
const note = ref(deepClone(props.note));
|
2023-12-02 12:09:25 +00:00
|
|
|
|
|
|
|
function noteclick(id: string) {
|
|
|
|
const selection = document.getSelection();
|
|
|
|
if (selection?.toString().length === 0) {
|
|
|
|
router.push(`/notes/${id}`);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// plugin
|
|
|
|
if (noteViewInterruptors.length > 0) {
|
|
|
|
onMounted(async () => {
|
2023-12-23 01:09:23 +00:00
|
|
|
let result: Misskey.entities.Note | null = deepClone(note.value);
|
2023-12-02 12:09:25 +00:00
|
|
|
for (const interruptor of noteViewInterruptors) {
|
|
|
|
try {
|
2024-02-03 20:29:46 +00:00
|
|
|
result = await interruptor.handler(result!) as Misskey.entities.Note | null;
|
2023-12-02 12:09:25 +00:00
|
|
|
if (result === null) {
|
|
|
|
isDeleted.value = true;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
} catch (err) {
|
|
|
|
console.error(err);
|
|
|
|
}
|
|
|
|
}
|
2024-02-03 20:29:46 +00:00
|
|
|
note.value = result as Misskey.entities.Note;
|
2023-12-02 12:09:25 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
const isRenote = (
|
2023-12-23 01:09:23 +00:00
|
|
|
note.value.renote != null &&
|
|
|
|
note.value.text == null &&
|
|
|
|
note.value.cw == null &&
|
2024-02-03 20:29:46 +00:00
|
|
|
note.value.fileIds && note.value.fileIds.length === 0 &&
|
2023-12-23 01:09:23 +00:00
|
|
|
note.value.poll == null
|
2023-12-02 12:09:25 +00:00
|
|
|
);
|
|
|
|
|
2024-02-03 20:29:46 +00:00
|
|
|
const rootEl = shallowRef<HTMLElement>();
|
2023-12-02 12:09:25 +00:00
|
|
|
const menuButton = shallowRef<HTMLElement>();
|
|
|
|
const menuVersionsButton = shallowRef<HTMLElement>();
|
|
|
|
const renoteButton = shallowRef<HTMLElement>();
|
|
|
|
const renoteTime = shallowRef<HTMLElement>();
|
|
|
|
const reactButton = shallowRef<HTMLElement>();
|
|
|
|
const quoteButton = shallowRef<HTMLElement>();
|
|
|
|
const clipButton = shallowRef<HTMLElement>();
|
|
|
|
const likeButton = shallowRef<HTMLElement>();
|
2023-12-23 01:09:23 +00:00
|
|
|
const appearNote = computed(() => isRenote ? note.value.renote as Misskey.entities.Note : note.value);
|
2023-12-02 12:09:25 +00:00
|
|
|
|
2023-12-23 01:09:23 +00:00
|
|
|
const isMyRenote = $i && ($i.id === note.value.userId);
|
2023-12-03 18:35:39 +00:00
|
|
|
const showContent = ref(defaultStore.state.uncollapseCW);
|
2024-01-08 13:59:15 +00:00
|
|
|
const parsed = computed(() => appearNote.value.text ? mfm.parse(appearNote.value.text) : null);
|
2024-02-06 20:23:37 +00:00
|
|
|
const urls = computed(() => parsed.value ? extractUrlFromMfm(parsed.value).filter((url) => appearNote.value.renote?.url !== url && appearNote.value.renote?.uri !== url) : null);
|
2023-12-23 01:09:23 +00:00
|
|
|
const isLong = shouldCollapsed(appearNote.value, urls.value ?? []);
|
2024-01-22 19:11:26 +00:00
|
|
|
const collapsed = ref(defaultStore.state.expandLongNote && appearNote.value.cw == null && isLong ? false : appearNote.value.cw == null && isLong);
|
2023-12-02 12:09:25 +00:00
|
|
|
const isDeleted = ref(false);
|
|
|
|
const renoted = ref(false);
|
2023-12-23 01:09:23 +00:00
|
|
|
const muted = ref(checkMute(appearNote.value, $i?.mutedWords));
|
2024-01-21 12:11:23 +00:00
|
|
|
const hardMuted = ref(props.withHardMute && checkMute(appearNote.value, $i?.hardMutedWords, true));
|
2024-01-21 12:37:41 +00:00
|
|
|
const translation = ref<Misskey.entities.NotesTranslateResponse | null>(null);
|
2023-12-02 12:09:25 +00:00
|
|
|
const translating = ref(false);
|
2023-12-23 01:09:23 +00:00
|
|
|
const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.value.user.instance);
|
2024-02-03 19:19:44 +00:00
|
|
|
const canRenote = computed(() => ['public', 'home'].includes(appearNote.value.visibility) || (appearNote.value.visibility === 'followers' && appearNote.value.userId === $i?.id));
|
|
|
|
const renoteCollapsed = ref(
|
|
|
|
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
|
|
|
|
(appearNote.value.myReaction != null)
|
|
|
|
)
|
|
|
|
);
|
2023-12-02 12:09:25 +00:00
|
|
|
const defaultLike = computed(() => defaultStore.state.like ? defaultStore.state.like : null);
|
2023-12-23 01:09:23 +00:00
|
|
|
const animated = computed(() => parsed.value ? checkAnimationFromMfm(parsed.value) : null);
|
|
|
|
const allowAnim = ref(defaultStore.state.advancedMfm && defaultStore.state.animatedMfm ? true : false);
|
|
|
|
|
2024-01-21 12:11:23 +00:00
|
|
|
/* Overload FunctionにLintが対応していないのでコメントアウト
|
|
|
|
function checkMute(noteToCheck: Misskey.entities.Note, mutedWords: Array<string | string[]> | undefined | null, checkOnly: true): boolean;
|
|
|
|
function checkMute(noteToCheck: Misskey.entities.Note, mutedWords: Array<string | string[]> | undefined | null, checkOnly: false): boolean | 'sensitiveMute';
|
|
|
|
*/
|
|
|
|
function checkMute(noteToCheck: Misskey.entities.Note, mutedWords: Array<string | string[]> | undefined | null, checkOnly = false): boolean | 'sensitiveMute' {
|
2023-12-23 01:09:23 +00:00
|
|
|
if (mutedWords == null) return false;
|
|
|
|
|
2024-01-21 12:11:23 +00:00
|
|
|
if (checkWordMute(noteToCheck, $i, mutedWords)) return true;
|
|
|
|
if (noteToCheck.reply && checkWordMute(noteToCheck.reply, $i, mutedWords)) return true;
|
|
|
|
if (noteToCheck.renote && checkWordMute(noteToCheck.renote, $i, mutedWords)) return true;
|
|
|
|
|
|
|
|
if (checkOnly) return false;
|
|
|
|
|
|
|
|
if (inTimeline && !defaultStore.state.tl.filter.withSensitive && noteToCheck.files?.some((v) => v.isSensitive)) return 'sensitiveMute';
|
2023-12-23 01:09:23 +00:00
|
|
|
return false;
|
|
|
|
}
|
2023-12-02 12:09:25 +00:00
|
|
|
|
|
|
|
const keymap = {
|
|
|
|
'r': () => reply(true),
|
|
|
|
'e|a|plus': () => react(true),
|
2024-02-03 20:29:46 +00:00
|
|
|
'q': () => renote(appearNote.value.visibility),
|
2023-12-02 12:09:25 +00:00
|
|
|
'up|k|shift+tab': focusBefore,
|
|
|
|
'down|j|tab': focusAfter,
|
|
|
|
'esc': blur,
|
2024-02-03 20:29:46 +00:00
|
|
|
'm|o': () => showMenu(true),
|
2023-12-02 12:09:25 +00:00
|
|
|
's': () => showContent.value !== showContent.value,
|
|
|
|
};
|
|
|
|
|
|
|
|
provide('react', (reaction: string) => {
|
2024-01-09 01:57:57 +00:00
|
|
|
misskeyApi('notes/reactions/create', {
|
2023-12-23 01:09:23 +00:00
|
|
|
noteId: appearNote.value.id,
|
2023-12-02 12:09:25 +00:00
|
|
|
reaction: reaction,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
if (props.mock) {
|
|
|
|
watch(() => props.note, (to) => {
|
2023-12-23 01:09:23 +00:00
|
|
|
note.value = deepClone(to);
|
2023-12-02 12:09:25 +00:00
|
|
|
}, { deep: true });
|
|
|
|
} else {
|
|
|
|
useNoteCapture({
|
2024-02-03 20:29:46 +00:00
|
|
|
rootEl: rootEl,
|
2023-12-23 01:09:23 +00:00
|
|
|
note: appearNote,
|
|
|
|
pureNote: note,
|
2023-12-02 12:09:25 +00:00
|
|
|
isDeletedRef: isDeleted,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!props.mock) {
|
|
|
|
useTooltip(renoteButton, async (showing) => {
|
2024-01-09 01:57:57 +00:00
|
|
|
const renotes = await misskeyApi('notes/renotes', {
|
2023-12-23 01:09:23 +00:00
|
|
|
noteId: appearNote.value.id,
|
2023-12-02 12:09:25 +00:00
|
|
|
limit: 11,
|
|
|
|
});
|
|
|
|
|
|
|
|
const users = renotes.map(x => x.user);
|
|
|
|
|
|
|
|
if (users.length < 1) return;
|
|
|
|
|
|
|
|
os.popup(MkUsersTooltip, {
|
|
|
|
showing,
|
|
|
|
users,
|
2023-12-23 01:09:23 +00:00
|
|
|
count: appearNote.value.renoteCount,
|
2023-12-02 12:09:25 +00:00
|
|
|
targetElement: renoteButton.value,
|
|
|
|
}, {}, 'closed');
|
|
|
|
});
|
|
|
|
|
|
|
|
useTooltip(quoteButton, async (showing) => {
|
2024-01-09 01:57:57 +00:00
|
|
|
const renotes = await misskeyApi('notes/renotes', {
|
2023-12-23 01:09:23 +00:00
|
|
|
noteId: appearNote.value.id,
|
2023-12-02 12:09:25 +00:00
|
|
|
limit: 11,
|
|
|
|
quote: true,
|
|
|
|
});
|
|
|
|
|
|
|
|
const users = renotes.map(x => x.user);
|
|
|
|
|
|
|
|
if (users.length < 1) return;
|
|
|
|
|
|
|
|
os.popup(MkUsersTooltip, {
|
|
|
|
showing,
|
|
|
|
users,
|
2023-12-23 01:09:23 +00:00
|
|
|
count: appearNote.value.renoteCount,
|
2023-12-02 12:09:25 +00:00
|
|
|
targetElement: quoteButton.value,
|
|
|
|
}, {}, 'closed');
|
|
|
|
});
|
|
|
|
|
|
|
|
if ($i) {
|
2024-01-09 01:57:57 +00:00
|
|
|
misskeyApi('notes/renotes', {
|
2023-12-23 01:09:23 +00:00
|
|
|
noteId: appearNote.value.id,
|
2023-12-02 12:09:25 +00:00
|
|
|
userId: $i.id,
|
|
|
|
limit: 1,
|
|
|
|
}).then((res) => {
|
|
|
|
renoted.value = res.length > 0;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
type Visibility = 'public' | 'home' | 'followers' | 'specified';
|
|
|
|
|
|
|
|
// defaultStore.state.visibilityがstringなためstringも受け付けている
|
|
|
|
function smallerVisibility(a: Visibility | string, b: Visibility | string): Visibility {
|
|
|
|
if (a === 'specified' || b === 'specified') return 'specified';
|
|
|
|
if (a === 'followers' || b === 'followers') return 'followers';
|
|
|
|
if (a === 'home' || b === 'home') return 'home';
|
|
|
|
// if (a === 'public' || b === 'public')
|
|
|
|
return 'public';
|
|
|
|
}
|
|
|
|
|
2023-12-03 23:19:34 +00:00
|
|
|
function boostVisibility() {
|
2024-01-01 19:34:18 +00:00
|
|
|
if (!defaultStore.state.showVisibilitySelectorOnBoost) {
|
|
|
|
renote(defaultStore.state.visibilityOnBoost);
|
|
|
|
} else {
|
|
|
|
os.popupMenu([
|
|
|
|
{
|
|
|
|
type: 'button',
|
|
|
|
icon: 'ph-globe-hemisphere-west ph-bold ph-lg',
|
|
|
|
text: i18n.ts._visibility['public'],
|
|
|
|
action: () => {
|
|
|
|
renote('public');
|
|
|
|
},
|
2023-12-03 23:19:34 +00:00
|
|
|
},
|
2024-01-01 19:34:18 +00:00
|
|
|
{
|
|
|
|
type: 'button',
|
|
|
|
icon: 'ph-house ph-bold ph-lg',
|
|
|
|
text: i18n.ts._visibility['home'],
|
|
|
|
action: () => {
|
|
|
|
renote('home');
|
|
|
|
},
|
2023-12-03 23:19:34 +00:00
|
|
|
},
|
2024-01-01 19:34:18 +00:00
|
|
|
{
|
|
|
|
type: 'button',
|
|
|
|
icon: 'ph-lock ph-bold ph-lg',
|
|
|
|
text: i18n.ts._visibility['followers'],
|
|
|
|
action: () => {
|
|
|
|
renote('followers');
|
|
|
|
},
|
2023-12-03 23:19:34 +00:00
|
|
|
},
|
2024-01-01 19:34:18 +00:00
|
|
|
{
|
|
|
|
type: 'button',
|
|
|
|
icon: 'ph-planet ph-bold ph-lg',
|
|
|
|
text: i18n.ts._timelines.local,
|
|
|
|
action: () => {
|
|
|
|
renote('local');
|
|
|
|
},
|
|
|
|
}], renoteButton.value);
|
|
|
|
}
|
2023-12-03 23:19:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function renote(visibility: Visibility | 'local') {
|
2023-12-02 12:09:25 +00:00
|
|
|
pleaseLogin();
|
|
|
|
showMovedDialog();
|
|
|
|
|
2023-12-23 01:09:23 +00:00
|
|
|
if (appearNote.value.channel) {
|
2023-12-02 12:09:25 +00:00
|
|
|
const el = renoteButton.value as HTMLElement | null | undefined;
|
|
|
|
if (el) {
|
|
|
|
const rect = el.getBoundingClientRect();
|
|
|
|
const x = rect.left + (el.offsetWidth / 2);
|
|
|
|
const y = rect.top + (el.offsetHeight / 2);
|
|
|
|
os.popup(MkRippleEffect, { x, y }, {}, 'end');
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!props.mock) {
|
2024-01-09 01:57:57 +00:00
|
|
|
misskeyApi('notes/create', {
|
2023-12-23 01:09:23 +00:00
|
|
|
renoteId: appearNote.value.id,
|
|
|
|
channelId: appearNote.value.channelId,
|
2023-12-02 12:09:25 +00:00
|
|
|
}).then(() => {
|
|
|
|
os.toast(i18n.ts.renoted);
|
|
|
|
renoted.value = true;
|
|
|
|
});
|
|
|
|
}
|
2024-02-03 14:01:09 +00:00
|
|
|
} else if (!appearNote.value.channel || appearNote.value.channel.allowRenoteToExternal) {
|
2023-12-02 12:09:25 +00:00
|
|
|
const el = renoteButton.value as HTMLElement | null | undefined;
|
|
|
|
if (el) {
|
|
|
|
const rect = el.getBoundingClientRect();
|
|
|
|
const x = rect.left + (el.offsetWidth / 2);
|
|
|
|
const y = rect.top + (el.offsetHeight / 2);
|
|
|
|
os.popup(MkRippleEffect, { x, y }, {}, 'end');
|
|
|
|
}
|
|
|
|
|
|
|
|
const configuredVisibility = defaultStore.state.rememberNoteVisibility ? defaultStore.state.visibility : defaultStore.state.defaultNoteVisibility;
|
2023-12-03 23:19:34 +00:00
|
|
|
const localOnlySetting = defaultStore.state.rememberNoteVisibility ? defaultStore.state.localOnly : defaultStore.state.defaultNoteLocalOnly;
|
2023-12-02 12:09:25 +00:00
|
|
|
|
2023-12-23 01:09:23 +00:00
|
|
|
let noteVisibility = visibility === 'local' || visibility === 'specified' ? smallerVisibility(appearNote.value.visibility, configuredVisibility) : smallerVisibility(visibility, configuredVisibility);
|
|
|
|
if (appearNote.value.channel?.isSensitive) {
|
|
|
|
noteVisibility = smallerVisibility(visibility === 'local' || visibility === 'specified' ? appearNote.value.visibility : visibility, 'home');
|
2023-12-02 12:09:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!props.mock) {
|
2024-01-09 01:57:57 +00:00
|
|
|
misskeyApi('notes/create', {
|
2023-12-03 23:19:34 +00:00
|
|
|
localOnly: visibility === 'local' ? true : localOnlySetting,
|
|
|
|
visibility: noteVisibility,
|
2023-12-23 01:09:23 +00:00
|
|
|
renoteId: appearNote.value.id,
|
2023-12-02 12:09:25 +00:00
|
|
|
}).then(() => {
|
|
|
|
os.toast(i18n.ts.renoted);
|
|
|
|
renoted.value = true;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function quote() {
|
|
|
|
pleaseLogin();
|
|
|
|
showMovedDialog();
|
|
|
|
if (props.mock) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2023-12-23 01:09:23 +00:00
|
|
|
if (appearNote.value.channel) {
|
2023-12-02 12:09:25 +00:00
|
|
|
os.post({
|
2023-12-23 01:09:23 +00:00
|
|
|
renote: appearNote.value,
|
|
|
|
channel: appearNote.value.channel,
|
2023-12-02 12:09:25 +00:00
|
|
|
}).then(() => {
|
2024-01-09 01:57:57 +00:00
|
|
|
misskeyApi('notes/renotes', {
|
2023-12-23 01:09:23 +00:00
|
|
|
noteId: appearNote.value.id,
|
2024-02-03 20:29:46 +00:00
|
|
|
userId: $i?.id,
|
2023-12-02 12:09:25 +00:00
|
|
|
limit: 1,
|
|
|
|
quote: true,
|
|
|
|
}).then((res) => {
|
|
|
|
if (!(res.length > 0)) return;
|
|
|
|
const el = quoteButton.value as HTMLElement | null | undefined;
|
|
|
|
if (el && res.length > 0) {
|
|
|
|
const rect = el.getBoundingClientRect();
|
|
|
|
const x = rect.left + (el.offsetWidth / 2);
|
|
|
|
const y = rect.top + (el.offsetHeight / 2);
|
|
|
|
os.popup(MkRippleEffect, { x, y }, {}, 'end');
|
|
|
|
}
|
|
|
|
|
|
|
|
os.toast(i18n.ts.quoted);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
os.post({
|
2023-12-23 01:09:23 +00:00
|
|
|
renote: appearNote.value,
|
2023-12-02 12:09:25 +00:00
|
|
|
}).then(() => {
|
2024-01-09 01:57:57 +00:00
|
|
|
misskeyApi('notes/renotes', {
|
2023-12-23 01:09:23 +00:00
|
|
|
noteId: appearNote.value.id,
|
2024-02-03 20:29:46 +00:00
|
|
|
userId: $i?.id,
|
2023-12-02 12:09:25 +00:00
|
|
|
limit: 1,
|
|
|
|
quote: true,
|
|
|
|
}).then((res) => {
|
|
|
|
if (!(res.length > 0)) return;
|
|
|
|
const el = quoteButton.value as HTMLElement | null | undefined;
|
|
|
|
if (el && res.length > 0) {
|
|
|
|
const rect = el.getBoundingClientRect();
|
|
|
|
const x = rect.left + (el.offsetWidth / 2);
|
|
|
|
const y = rect.top + (el.offsetHeight / 2);
|
|
|
|
os.popup(MkRippleEffect, { x, y }, {}, 'end');
|
|
|
|
}
|
|
|
|
|
|
|
|
os.toast(i18n.ts.quoted);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function reply(viaKeyboard = false): void {
|
|
|
|
pleaseLogin();
|
|
|
|
if (props.mock) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
os.post({
|
2023-12-23 01:09:23 +00:00
|
|
|
reply: appearNote.value,
|
|
|
|
channel: appearNote.value.channel,
|
2023-12-02 12:09:25 +00:00
|
|
|
animation: !viaKeyboard,
|
2024-02-03 20:29:46 +00:00
|
|
|
}).then(() => {
|
2023-12-02 12:09:25 +00:00
|
|
|
focus();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function like(): void {
|
|
|
|
pleaseLogin();
|
|
|
|
showMovedDialog();
|
2024-01-09 09:35:10 +00:00
|
|
|
sound.playMisskeySfx('reaction');
|
2023-12-02 12:09:25 +00:00
|
|
|
if (props.mock) {
|
|
|
|
return;
|
|
|
|
}
|
2024-01-09 01:57:57 +00:00
|
|
|
misskeyApi('notes/like', {
|
2023-12-23 01:09:23 +00:00
|
|
|
noteId: appearNote.value.id,
|
2023-12-02 12:09:25 +00:00
|
|
|
override: defaultLike.value,
|
|
|
|
});
|
|
|
|
const el = likeButton.value as HTMLElement | null | undefined;
|
|
|
|
if (el) {
|
|
|
|
const rect = el.getBoundingClientRect();
|
|
|
|
const x = rect.left + (el.offsetWidth / 2);
|
|
|
|
const y = rect.top + (el.offsetHeight / 2);
|
|
|
|
os.popup(MkRippleEffect, { x, y }, {}, 'end');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function react(viaKeyboard = false): void {
|
|
|
|
pleaseLogin();
|
|
|
|
showMovedDialog();
|
2023-12-23 01:09:23 +00:00
|
|
|
if (appearNote.value.reactionAcceptance === 'likeOnly') {
|
2024-01-09 09:35:10 +00:00
|
|
|
sound.playMisskeySfx('reaction');
|
2023-12-23 01:09:23 +00:00
|
|
|
|
2023-12-02 12:09:25 +00:00
|
|
|
if (props.mock) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2024-01-09 01:57:57 +00:00
|
|
|
misskeyApi('notes/like', {
|
2023-12-23 01:09:23 +00:00
|
|
|
noteId: appearNote.value.id,
|
2023-12-02 12:09:25 +00:00
|
|
|
override: defaultLike.value,
|
|
|
|
});
|
2024-02-03 20:29:46 +00:00
|
|
|
const el = reactButton.value;
|
2023-12-02 12:09:25 +00:00
|
|
|
if (el) {
|
|
|
|
const rect = el.getBoundingClientRect();
|
|
|
|
const x = rect.left + (el.offsetWidth / 2);
|
|
|
|
const y = rect.top + (el.offsetHeight / 2);
|
|
|
|
os.popup(MkRippleEffect, { x, y }, {}, 'end');
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
blur();
|
2024-02-06 20:27:42 +00:00
|
|
|
reactionPicker.show(reactButton.value ?? null, note.value, reaction => {
|
2024-01-09 09:35:10 +00:00
|
|
|
sound.playMisskeySfx('reaction');
|
2023-12-23 01:09:23 +00:00
|
|
|
|
2023-12-02 12:09:25 +00:00
|
|
|
if (props.mock) {
|
|
|
|
emit('reaction', reaction);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2024-01-09 01:57:57 +00:00
|
|
|
misskeyApi('notes/reactions/create', {
|
2023-12-23 01:09:23 +00:00
|
|
|
noteId: appearNote.value.id,
|
2023-12-02 12:09:25 +00:00
|
|
|
reaction: reaction,
|
|
|
|
});
|
2023-12-23 01:09:23 +00:00
|
|
|
if (appearNote.value.text && appearNote.value.text.length > 100 && (Date.now() - new Date(appearNote.value.createdAt).getTime() < 1000 * 3)) {
|
2023-12-02 12:09:25 +00:00
|
|
|
claimAchievement('reactWithoutRead');
|
|
|
|
}
|
|
|
|
}, () => {
|
|
|
|
focus();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-02-03 20:29:46 +00:00
|
|
|
function undoReact(targetNote: Misskey.entities.Note): void {
|
|
|
|
const oldReaction = targetNote.myReaction;
|
2023-12-02 12:09:25 +00:00
|
|
|
if (!oldReaction) return;
|
|
|
|
|
|
|
|
if (props.mock) {
|
|
|
|
emit('removeReaction', oldReaction);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2024-01-09 01:57:57 +00:00
|
|
|
misskeyApi('notes/reactions/delete', {
|
2024-02-03 20:29:46 +00:00
|
|
|
noteId: targetNote.id,
|
2023-12-02 12:09:25 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function undoRenote(note) : void {
|
|
|
|
if (props.mock) {
|
|
|
|
return;
|
|
|
|
}
|
2024-01-09 01:57:57 +00:00
|
|
|
misskeyApi('notes/unrenote', {
|
2023-12-23 01:09:23 +00:00
|
|
|
noteId: note.id,
|
2023-12-02 12:09:25 +00:00
|
|
|
});
|
|
|
|
os.toast(i18n.ts.rmboost);
|
|
|
|
renoted.value = false;
|
|
|
|
|
|
|
|
const el = renoteButton.value as HTMLElement | null | undefined;
|
|
|
|
if (el) {
|
|
|
|
const rect = el.getBoundingClientRect();
|
|
|
|
const x = rect.left + (el.offsetWidth / 2);
|
|
|
|
const y = rect.top + (el.offsetHeight / 2);
|
|
|
|
os.popup(MkRippleEffect, { x, y }, {}, 'end');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function onContextmenu(ev: MouseEvent): void {
|
|
|
|
if (props.mock) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2024-02-03 20:29:46 +00:00
|
|
|
const isLink = (el: HTMLElement): boolean => {
|
2023-12-02 12:09:25 +00:00
|
|
|
if (el.tagName === 'A') return true;
|
|
|
|
// 再生速度の選択などのために、Audio要素のコンテキストメニューはブラウザデフォルトとする。
|
|
|
|
if (el.tagName === 'AUDIO') return true;
|
|
|
|
if (el.parentElement) {
|
|
|
|
return isLink(el.parentElement);
|
|
|
|
}
|
2024-02-03 20:29:46 +00:00
|
|
|
return false;
|
2023-12-02 12:09:25 +00:00
|
|
|
};
|
2024-02-03 20:29:46 +00:00
|
|
|
|
|
|
|
if (ev.target && isLink(ev.target as HTMLElement)) return;
|
|
|
|
if (window.getSelection()?.toString() !== '') return;
|
2023-12-02 12:09:25 +00:00
|
|
|
|
|
|
|
if (defaultStore.state.useReactionPickerForContextMenu) {
|
|
|
|
ev.preventDefault();
|
|
|
|
react();
|
|
|
|
} else {
|
2024-02-03 20:29:46 +00:00
|
|
|
const { menu, cleanup } = getNoteMenu({ note: note.value, translating, translation, isDeleted, currentClip: currentClip?.value });
|
2023-12-02 12:09:25 +00:00
|
|
|
os.contextMenu(menu, ev).then(focus).finally(cleanup);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-02-03 19:19:44 +00:00
|
|
|
function showMenu(viaKeyboard = false): void {
|
2023-12-02 12:09:25 +00:00
|
|
|
if (props.mock) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2024-02-03 19:19:44 +00:00
|
|
|
const { menu, cleanup } = getNoteMenu({ note: note.value, translating, translation, isDeleted, currentClip: currentClip?.value });
|
2023-12-02 12:09:25 +00:00
|
|
|
os.popupMenu(menu, menuButton.value, {
|
|
|
|
viaKeyboard,
|
|
|
|
}).then(focus).finally(cleanup);
|
|
|
|
}
|
|
|
|
|
|
|
|
async function menuVersions(viaKeyboard = false): Promise<void> {
|
2023-12-23 01:09:23 +00:00
|
|
|
const { menu, cleanup } = await getNoteVersionsMenu({ note: note.value, menuVersionsButton });
|
2023-12-02 12:09:25 +00:00
|
|
|
os.popupMenu(menu, menuVersionsButton.value, {
|
|
|
|
viaKeyboard,
|
|
|
|
}).then(focus).finally(cleanup);
|
|
|
|
}
|
|
|
|
|
|
|
|
async function clip() {
|
|
|
|
if (props.mock) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2023-12-23 01:09:23 +00:00
|
|
|
os.popupMenu(await getNoteClipMenu({ note: note.value, isDeleted, currentClip: currentClip?.value }), clipButton.value).then(focus);
|
2023-12-02 12:09:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function showRenoteMenu(viaKeyboard = false): void {
|
|
|
|
if (props.mock) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
function getUnrenote(): MenuItem {
|
|
|
|
return {
|
|
|
|
text: i18n.ts.unrenote,
|
|
|
|
icon: 'ph-trash ph-bold ph-lg',
|
|
|
|
danger: true,
|
|
|
|
action: () => {
|
2024-01-09 01:57:57 +00:00
|
|
|
misskeyApi('notes/delete', {
|
2023-12-23 01:09:23 +00:00
|
|
|
noteId: note.value.id,
|
2023-12-02 12:09:25 +00:00
|
|
|
});
|
|
|
|
isDeleted.value = true;
|
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
if (isMyRenote) {
|
|
|
|
pleaseLogin();
|
|
|
|
os.popupMenu([
|
2023-12-23 01:09:23 +00:00
|
|
|
getCopyNoteLinkMenu(note.value, i18n.ts.copyLinkRenote),
|
|
|
|
{ type: 'divider' },
|
2023-12-02 12:09:25 +00:00
|
|
|
getUnrenote(),
|
|
|
|
], renoteTime.value, {
|
|
|
|
viaKeyboard: viaKeyboard,
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
os.popupMenu([
|
2023-12-23 01:09:23 +00:00
|
|
|
getCopyNoteLinkMenu(note.value, i18n.ts.copyLinkRenote),
|
|
|
|
{ type: 'divider' },
|
|
|
|
getAbuseNoteMenu(note.value, i18n.ts.reportAbuseRenote),
|
2024-02-03 20:29:46 +00:00
|
|
|
($i?.isModerator || $i?.isAdmin) ? getUnrenote() : undefined,
|
2023-12-02 12:09:25 +00:00
|
|
|
], renoteTime.value, {
|
|
|
|
viaKeyboard: viaKeyboard,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function animatedMFM() {
|
|
|
|
if (allowAnim.value) {
|
|
|
|
allowAnim.value = false;
|
|
|
|
} else {
|
|
|
|
os.confirm({
|
|
|
|
type: 'warning',
|
|
|
|
text: i18n.ts._animatedMFM._alert.text,
|
|
|
|
okText: i18n.ts._animatedMFM._alert.confirm,
|
|
|
|
}).then((res) => { if (!res.canceled) allowAnim.value = true; });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function focus() {
|
2024-02-03 20:29:46 +00:00
|
|
|
rootEl.value?.focus();
|
2023-12-02 12:09:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function blur() {
|
2024-02-03 20:29:46 +00:00
|
|
|
rootEl.value?.blur();
|
2023-12-02 12:09:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function focusBefore() {
|
2024-02-03 20:29:46 +00:00
|
|
|
focusPrev(rootEl.value ?? null);
|
2023-12-02 12:09:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function focusAfter() {
|
2024-02-03 20:29:46 +00:00
|
|
|
focusNext(rootEl.value ?? null);
|
2024-01-03 12:52:46 +00:00
|
|
|
}
|
|
|
|
|
2023-12-02 12:09:25 +00:00
|
|
|
function readPromo() {
|
2024-01-09 01:57:57 +00:00
|
|
|
misskeyApi('promo/read', {
|
2023-12-23 01:09:23 +00:00
|
|
|
noteId: appearNote.value.id,
|
2023-12-02 12:09:25 +00:00
|
|
|
});
|
|
|
|
isDeleted.value = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
function emitUpdReaction(emoji: string, delta: number) {
|
|
|
|
if (delta < 0) {
|
|
|
|
emit('removeReaction', emoji);
|
|
|
|
} else if (delta > 0) {
|
|
|
|
emit('reaction', emoji);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" module>
|
|
|
|
.root {
|
|
|
|
position: relative;
|
|
|
|
transition: box-shadow 0.1s ease;
|
|
|
|
font-size: 1.05em;
|
|
|
|
overflow: clip;
|
|
|
|
contain: content;
|
|
|
|
|
|
|
|
// これらの指定はパフォーマンス向上には有効だが、ノートの高さは一定でないため、
|
|
|
|
// 下の方までスクロールすると上のノートの高さがここで決め打ちされたものに変化し、表示しているノートの位置が変わってしまう
|
|
|
|
// ノートがマウントされたときに自身の高さを取得し contain-intrinsic-size を設定しなおせばほぼ解決できそうだが、
|
|
|
|
// 今度はその処理自体がパフォーマンス低下の原因にならないか懸念される。また、被リアクションでも高さは変化するため、やはり多少のズレは生じる
|
|
|
|
// 一度レンダリングされた要素はブラウザがよしなにサイズを覚えておいてくれるような実装になるまで待った方が良さそう(なるのか?)
|
|
|
|
//content-visibility: auto;
|
|
|
|
//contain-intrinsic-size: 0 128px;
|
|
|
|
|
|
|
|
&:focus-visible {
|
|
|
|
outline: none;
|
|
|
|
|
|
|
|
&:after {
|
|
|
|
content: "";
|
|
|
|
pointer-events: none;
|
|
|
|
display: block;
|
|
|
|
position: absolute;
|
|
|
|
z-index: 10;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
margin: auto;
|
|
|
|
width: calc(100% - 8px);
|
|
|
|
height: calc(100% - 8px);
|
2024-01-03 12:52:46 +00:00
|
|
|
border: solid 1px var(--focus);
|
2023-12-02 12:09:25 +00:00
|
|
|
border-radius: var(--radius);
|
|
|
|
box-sizing: border-box;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.footer {
|
2024-01-06 16:28:38 +00:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
2023-12-02 12:09:25 +00:00
|
|
|
position: relative;
|
|
|
|
z-index: 1;
|
|
|
|
margin-top: 0.4em;
|
2024-01-06 16:28:38 +00:00
|
|
|
max-width: 400px;
|
2023-12-02 12:09:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:hover > .article > .main > .footer > .footerButton {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.showActionsOnlyHover {
|
|
|
|
.footer {
|
|
|
|
visibility: hidden;
|
|
|
|
position: absolute;
|
|
|
|
top: 12px;
|
|
|
|
right: 12px;
|
|
|
|
padding: 0 4px;
|
|
|
|
margin-bottom: 0 !important;
|
|
|
|
background: var(--popup);
|
|
|
|
border-radius: var(--radius-sm);
|
|
|
|
box-shadow: 0px 4px 32px var(--shadow);
|
|
|
|
}
|
|
|
|
|
|
|
|
.footerButton {
|
|
|
|
font-size: 90%;
|
|
|
|
|
|
|
|
&:not(:last-child) {
|
|
|
|
margin-right: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.showActionsOnlyHover:hover {
|
|
|
|
.footer {
|
|
|
|
visibility: visible;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.tip {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
padding: 16px 32px 8px 32px;
|
|
|
|
line-height: 24px;
|
|
|
|
font-size: 90%;
|
|
|
|
white-space: pre;
|
|
|
|
color: #d28a3f;
|
|
|
|
}
|
|
|
|
|
|
|
|
.tip + .article {
|
|
|
|
padding-top: 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.replyTo {
|
|
|
|
padding-bottom: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.renote {
|
|
|
|
position: relative;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2024-01-03 10:37:50 +00:00
|
|
|
padding: 24px 32px 0 calc(32px + var(--avatar) + 14px);
|
2023-12-02 12:09:25 +00:00
|
|
|
line-height: 28px;
|
|
|
|
white-space: pre;
|
|
|
|
color: var(--renote);
|
|
|
|
|
2024-01-01 16:44:13 +00:00
|
|
|
&::before {
|
|
|
|
content: '';
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: calc(32px + .5 * var(--avatar));
|
|
|
|
bottom: -8px;
|
|
|
|
border-left: var(--thread-width) solid var(--thread);
|
|
|
|
}
|
|
|
|
|
|
|
|
&:first-child {
|
|
|
|
padding-left: 32px;
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-12-02 12:09:25 +00:00
|
|
|
& + .article {
|
|
|
|
padding-top: 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .colorBar {
|
|
|
|
height: calc(100% - 6px);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.renoteAvatar {
|
|
|
|
flex-shrink: 0;
|
2024-01-01 16:44:13 +00:00
|
|
|
display: none; /* same as Firefish, but keeping the element around in case someone wants to add it back via CSS override */
|
2023-12-02 12:09:25 +00:00
|
|
|
width: 28px;
|
|
|
|
height: 28px;
|
|
|
|
margin: 0 8px 0 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.renoteText {
|
|
|
|
overflow: hidden;
|
|
|
|
flex-shrink: 1;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
|
|
|
|
|
|
|
.renoteUserName {
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
|
|
|
.renoteInfo {
|
|
|
|
margin-left: auto;
|
|
|
|
font-size: 0.9em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.renoteTime {
|
|
|
|
flex-shrink: 0;
|
|
|
|
color: inherit;
|
|
|
|
}
|
|
|
|
|
|
|
|
.renoteMenu {
|
|
|
|
margin-right: 4px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.collapsedRenoteTarget {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
line-height: 28px;
|
|
|
|
white-space: pre;
|
|
|
|
padding: 8px 38px 24px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.collapsedRenoteTargetAvatar {
|
|
|
|
flex-shrink: 0;
|
|
|
|
display: inline-block;
|
|
|
|
width: 28px;
|
|
|
|
height: 28px;
|
|
|
|
margin: 0 8px 0 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.collapsedRenoteTargetText {
|
|
|
|
overflow: hidden;
|
|
|
|
flex-shrink: 1;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
white-space: nowrap;
|
|
|
|
font-size: 90%;
|
|
|
|
opacity: 0.7;
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
text-decoration: underline;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.article {
|
|
|
|
position: relative;
|
|
|
|
padding: 28px 32px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.colorBar {
|
|
|
|
position: absolute;
|
|
|
|
top: 8px;
|
|
|
|
left: 8px;
|
|
|
|
width: 5px;
|
|
|
|
height: calc(100% - 16px);
|
|
|
|
border-radius: var(--radius-ellipse);
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.avatar {
|
|
|
|
flex-shrink: 0;
|
|
|
|
display: block !important;
|
|
|
|
position: sticky !important;
|
|
|
|
margin: 0 14px 0 0;
|
2024-01-01 16:44:13 +00:00
|
|
|
width: var(--avatar);
|
|
|
|
height: var(--avatar);
|
2023-12-02 12:09:25 +00:00
|
|
|
position: sticky !important;
|
|
|
|
top: calc(22px + var(--stickyTop, 0px));
|
|
|
|
left: 0;
|
|
|
|
transition: top 0.5s;
|
|
|
|
|
|
|
|
&.avatarReplyTo {
|
|
|
|
position: relative !important;
|
|
|
|
top: 0 !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.main {
|
|
|
|
flex: 1;
|
|
|
|
min-width: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.cw {
|
|
|
|
display: block;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
overflow-wrap: break-word;
|
|
|
|
}
|
|
|
|
|
|
|
|
.showLess {
|
|
|
|
width: 100%;
|
|
|
|
margin-top: 14px;
|
|
|
|
position: sticky;
|
|
|
|
bottom: calc(var(--stickyBottom, 0px) - 100px);
|
|
|
|
}
|
|
|
|
|
|
|
|
.showLessLabel {
|
|
|
|
display: inline-block;
|
|
|
|
background: var(--popup);
|
|
|
|
padding: 6px 10px;
|
|
|
|
font-size: 0.8em;
|
|
|
|
border-radius: var(--radius-ellipse);
|
|
|
|
box-shadow: 0 2px 6px rgb(0 0 0 / 20%);
|
|
|
|
}
|
|
|
|
|
|
|
|
.contentCollapsed {
|
|
|
|
position: relative;
|
|
|
|
max-height: 9em;
|
|
|
|
overflow: clip;
|
|
|
|
}
|
|
|
|
|
|
|
|
.collapsed {
|
|
|
|
display: block;
|
|
|
|
position: absolute;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
z-index: 2;
|
|
|
|
width: 100%;
|
|
|
|
height: 64px;
|
|
|
|
//background: linear-gradient(0deg, var(--panel), var(--X15));
|
|
|
|
|
|
|
|
&:hover > .collapsedLabel {
|
|
|
|
background: var(--panelHighlight);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.collapsedLabel {
|
|
|
|
display: inline-block;
|
|
|
|
background: var(--panel);
|
|
|
|
padding: 6px 10px;
|
|
|
|
font-size: 0.8em;
|
|
|
|
border-radius: var(--radius-ellipse);
|
|
|
|
box-shadow: 0 2px 6px rgb(0 0 0 / 20%);
|
|
|
|
}
|
|
|
|
|
|
|
|
.text {
|
|
|
|
overflow-wrap: break-word;
|
|
|
|
}
|
|
|
|
|
|
|
|
.replyIcon {
|
|
|
|
color: var(--accent);
|
|
|
|
margin-right: 0.5em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.translation {
|
|
|
|
border: solid 0.5px var(--divider);
|
|
|
|
border-radius: var(--radius);
|
|
|
|
padding: 12px;
|
|
|
|
margin-top: 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.urlPreview {
|
|
|
|
margin-top: 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.playMFMButton {
|
|
|
|
margin-top: 5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.poll {
|
|
|
|
font-size: 80%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.quote {
|
|
|
|
padding: 8px 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.quoteNote {
|
|
|
|
padding: 16px;
|
|
|
|
// Made border solid, stylistic choice
|
|
|
|
border: solid 1px var(--renote);
|
|
|
|
border-radius: var(--radius-sm);
|
|
|
|
overflow: clip;
|
|
|
|
}
|
|
|
|
|
|
|
|
.channel {
|
|
|
|
opacity: 0.7;
|
|
|
|
font-size: 80%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.footer {
|
|
|
|
margin-bottom: -14px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.footerButton {
|
|
|
|
margin: 0;
|
|
|
|
padding: 8px;
|
|
|
|
opacity: 0.7;
|
|
|
|
|
|
|
|
&:not(:last-child) {
|
|
|
|
margin-right: 1.5em;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
color: var(--fgHighlighted);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.footerButtonCount {
|
|
|
|
display: inline;
|
|
|
|
margin: 0 0 0 8px;
|
|
|
|
opacity: 0.7;
|
|
|
|
}
|
|
|
|
|
|
|
|
@container (max-width: 580px) {
|
|
|
|
.root {
|
|
|
|
font-size: 0.95em;
|
2024-01-03 19:38:40 +00:00
|
|
|
--avatar: 46px;
|
2023-12-02 12:09:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.renote {
|
2024-01-03 19:38:40 +00:00
|
|
|
padding: 24px 26px 0 calc(26px + var(--avatar) + 14px);
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
left: calc(26px + .5 * var(--avatar));
|
|
|
|
}
|
2023-12-02 12:09:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.collapsedRenoteTarget {
|
2024-01-03 19:38:40 +00:00
|
|
|
padding: 8px 26px 24px;
|
2023-12-02 12:09:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.article {
|
|
|
|
padding: 24px 26px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@container (max-width: 500px) {
|
|
|
|
.root {
|
|
|
|
font-size: 0.9em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.article {
|
|
|
|
padding: 23px 25px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.footer {
|
|
|
|
margin-bottom: -8px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-01-03 19:38:40 +00:00
|
|
|
@container (max-width: 500px) {
|
|
|
|
.renote {
|
|
|
|
padding: 23px 25px 0 calc(25px + var(--avatar) + 14px);
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
left: calc(25px + .5 * var(--avatar));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-12-02 12:09:25 +00:00
|
|
|
@container (max-width: 480px) {
|
|
|
|
.renote {
|
2024-01-03 19:38:40 +00:00
|
|
|
padding: 22px 24px 0 calc(24px + var(--avatar) + 14px);
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
left: calc(24px + .5 * var(--avatar));
|
|
|
|
}
|
2023-12-02 12:09:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.tip {
|
|
|
|
padding: 8px 16px 0 16px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.collapsedRenoteTarget {
|
|
|
|
padding: 8px 24px 20px;
|
|
|
|
margin-top: 4px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.article {
|
|
|
|
padding: 22px 24px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@container (max-width: 450px) {
|
2024-01-03 19:38:40 +00:00
|
|
|
.root {
|
|
|
|
--avatar: 44px;
|
|
|
|
}
|
|
|
|
|
2023-12-02 12:09:25 +00:00
|
|
|
.avatar {
|
|
|
|
margin: 0 10px 0 0;
|
|
|
|
top: calc(14px + var(--stickyTop, 0px));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@container (max-width: 400px) {
|
|
|
|
.root:not(.showActionsOnlyHover) {
|
|
|
|
.footerButton {
|
|
|
|
&:not(:last-child) {
|
|
|
|
margin-right: 0.2em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@container (max-width: 350px) {
|
|
|
|
.root:not(.showActionsOnlyHover) {
|
|
|
|
.footerButton {
|
|
|
|
&:not(:last-child) {
|
|
|
|
margin-right: 0.1em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.colorBar {
|
|
|
|
top: 6px;
|
|
|
|
left: 6px;
|
|
|
|
width: 4px;
|
|
|
|
height: calc(100% - 12px);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@container (max-width: 300px) {
|
|
|
|
.root:not(.showActionsOnlyHover) {
|
|
|
|
.footerButton {
|
|
|
|
&:not(:last-child) {
|
|
|
|
margin-right: 0.1em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@container (max-width: 250px) {
|
|
|
|
.quoteNote {
|
|
|
|
padding: 12px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.muted {
|
|
|
|
padding: 8px;
|
|
|
|
text-align: center;
|
|
|
|
opacity: 0.7;
|
|
|
|
}
|
|
|
|
|
|
|
|
.reactionOmitted {
|
|
|
|
display: inline-block;
|
|
|
|
height: 32px;
|
|
|
|
margin: 2px;
|
|
|
|
padding: 0 6px;
|
|
|
|
opacity: .8;
|
|
|
|
}
|
|
|
|
|
|
|
|
.clickToOpen {
|
|
|
|
cursor: pointer;
|
2024-01-31 14:07:29 +00:00
|
|
|
-webkit-tap-highlight-color: transparent;
|
2023-12-02 12:09:25 +00:00
|
|
|
}
|
|
|
|
</style>
|