summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkNoteSub.vue
diff options
context:
space:
mode:
Diffstat (limited to 'packages/frontend/src/components/MkNoteSub.vue')
-rw-r--r--packages/frontend/src/components/MkNoteSub.vue21
1 files changed, 17 insertions, 4 deletions
diff --git a/packages/frontend/src/components/MkNoteSub.vue b/packages/frontend/src/components/MkNoteSub.vue
index 4fd1c210cb..3f5cc51938 100644
--- a/packages/frontend/src/components/MkNoteSub.vue
+++ b/packages/frontend/src/components/MkNoteSub.vue
@@ -4,7 +4,10 @@ SPDX-License-Identifier: AGPL-3.0-only
-->
<template>
-<div v-if="!muted" :class="[$style.root, { [$style.children]: depth > 1 }]">
+<div v-if="note == null" :class="$style.deleted">
+ {{ i18n.ts.deletedNote }}
+</div>
+<div v-else-if="!muted" :class="[$style.root, { [$style.children]: depth > 1 }]">
<div :class="$style.main">
<div v-if="note.channel" :class="$style.colorBar" :style="{ background: note.channel.color }"></div>
<MkAvatar :class="$style.avatar" :user="note.user" link preview/>
@@ -53,7 +56,7 @@ import { userPage } from '@/filters/user.js';
import { checkWordMute } from '@/utility/check-word-mute.js';
const props = withDefaults(defineProps<{
- note: Misskey.entities.Note;
+ note: Misskey.entities.Note | null;
detail?: boolean;
// how many notes are in between this one and the note being viewed in detail
@@ -62,12 +65,12 @@ const props = withDefaults(defineProps<{
depth: 1,
});
-const muted = ref($i ? checkWordMute(props.note, $i, $i.mutedWords) : false);
+const muted = ref(props.note && $i ? checkWordMute(props.note, $i, $i.mutedWords) : false);
const showContent = ref(false);
const replies = ref<Misskey.entities.Note[]>([]);
-if (props.detail) {
+if (props.detail && props.note) {
misskeyApi('notes/children', {
noteId: props.note.id,
limit: 5,
@@ -160,4 +163,14 @@ if (props.detail) {
margin: 8px 8px 0 8px;
border-radius: 8px;
}
+
+.deleted {
+ text-align: center;
+ padding: 8px !important;
+ margin: 8px 8px 0 8px;
+ --color: light-dark(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.15));
+ background-size: auto auto;
+ background-image: repeating-linear-gradient(135deg, transparent, transparent 10px, var(--color) 4px, var(--color) 14px);
+ border-radius: 8px;
+}
</style>