From dd8ab655a93e46c85c7b5e8691f33dcd622abc72 Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Fri, 23 Aug 2024 08:26:53 +0900
Subject: [PATCH] Update EmNote.vue
---
packages/embed/src/components/EmNote.vue | 44 ++++--------------------
1 file changed, 6 insertions(+), 38 deletions(-)
diff --git a/packages/embed/src/components/EmNote.vue b/packages/embed/src/components/EmNote.vue
index 9ba00456e2..7c32b152ab 100644
--- a/packages/embed/src/components/EmNote.vue
+++ b/packages/embed/src/components/EmNote.vue
@@ -7,17 +7,16 @@ SPDX-License-Identifier: AGPL-3.0-only
-
+
{{ i18n.ts.pinnedNote }}
-
+
@@ -40,16 +39,12 @@ SPDX-License-Identifier: AGPL-3.0-only
-
-
-
-
-
+
-
+
-
+
@@ -78,8 +73,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-
-
+
@@ -132,21 +126,14 @@ import EmReactionsViewerDetails from '@/components/EmReactionsViewer.details.vue
import EmMediaList from '@/components/EmMediaList.vue';
import EmCwButton from '@/components/EmCwButton.vue';
import EmPoll from '@/components/EmPoll.vue';
-import EmUsersTooltip from '@/components/EmUsersTooltip.vue';
-import EmUrlPreview from '@/components/EmUrlPreview.vue';
import EmInstanceTicker from '@/components/EmInstanceTicker.vue';
import { pleaseLogin, type OpenOnRemoteOptions } from '@/scripts/please-login.js';
import { userPage } from '@/filters/user.js';
import * as os from '@/os.js';
-import * as sound from '@/scripts/sound.js';
-import { misskeyApi, misskeyApiGet } from '@/scripts/misskey-api.js';
import { extractUrlFromMfm } from '@/scripts/extract-url-from-mfm.js';
-import { $i } from '@/account.js';
import { i18n } from '@/i18n.js';
-import { getAbuseNoteMenu, getCopyNoteLinkMenu, getNoteClipMenu, getNoteMenu, getRenoteMenu } from '@/scripts/get-note-menu.js';
import { deepClone } from '@/scripts/clone.js';
import { getNoteSummary } from '@/scripts/get-note-summary.js';
-import { MenuItem } from '@/types/menu.js';
import { shouldCollapsed } from '@/scripts/collapsed.js';
import { host } from '@/config.js';
import { url } from '@/config.js';
@@ -155,14 +142,9 @@ import { getAppearNote } from '@/scripts/get-appear-note.js';
const props = withDefaults(defineProps<{
note: Misskey.entities.Note;
pinned?: boolean;
- mock?: boolean;
- withHardMute?: boolean;
}>(), {
- mock: false,
});
-provide('mock', props.mock);
-
const emit = defineEmits<{
(ev: 'reaction', emoji: string): void;
(ev: 'removeReaction', emoji: string): void;
@@ -184,7 +166,6 @@ const renoteTime = shallowRef();
const reactButton = shallowRef();
const clipButton = shallowRef();
const appearNote = computed(() => getAppearNote(note.value));
-const galleryEl = shallowRef>();
const showContent = ref(false);
const parsed = computed(() => appearNote.value.text ? mfm.parse(appearNote.value.text) : null);
const urls = computed(() => parsed.value ? extractUrlFromMfm(parsed.value).filter((url) => appearNote.value.renote?.url !== url && appearNote.value.renote?.uri !== url) : null);
@@ -193,14 +174,7 @@ const collapsed = ref(appearNote.value.cw == null && isLong);
const isDeleted = ref(false);
const translation = ref(null);
const translating = ref(false);
-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 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)
- ),
-);
const pleaseLoginContext = computed(() => ({
type: 'lookup',
@@ -658,12 +632,6 @@ watch(() => props.note, (to) => {
}
}
-.muted {
- padding: 8px;
- text-align: center;
- opacity: 0.7;
-}
-
.reactionOmitted {
display: inline-block;
margin-left: 8px;