mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-14 12:15:51 +01:00
fix: word mute is not applied to sub note (#146)
* fix: word mute is not applied to sub note * chore: update changelog * chore: run eslint fix --------- Co-authored-by: 파링 <paring@pikokr.dev> Co-authored-by: tamaina <tamaina@hotmail.co.jp>
This commit is contained in:
parent
f593015a2a
commit
81dbccd3a8
1 changed files with 24 additions and 2 deletions
|
@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
-->
|
||||
|
||||
<template>
|
||||
<div :class="[$style.root, { [$style.children]: depth > 1 }]">
|
||||
<div v-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/>
|
||||
|
@ -28,10 +28,19 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkA class="_link" :to="notePage(note)">{{ i18n.ts.continueThread }} <i class="ti ti-chevron-double-right"></i></MkA>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else :class="$style.muted" @click="muted = false">
|
||||
<I18n :src="i18n.ts.userSaysSomething" tag="small">
|
||||
<template #name>
|
||||
<MkA v-user-preview="note.userId" :to="userPage(note.user)">
|
||||
<MkUserName :user="note.user"/>
|
||||
</MkA>
|
||||
</template>
|
||||
</I18n>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { } from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import MkNoteHeader from '@/components/MkNoteHeader.vue';
|
||||
import MkSubNoteContent from '@/components/MkSubNoteContent.vue';
|
||||
|
@ -40,6 +49,9 @@ import { notePage } from '@/filters/note';
|
|||
import * as os from '@/os';
|
||||
import { i18n } from '@/i18n';
|
||||
import { $i } from '@/account';
|
||||
import { userPage } from "@/filters/user";
|
||||
import { checkWordMute } from "@/scripts/check-word-mute";
|
||||
import { defaultStore } from "@/store";
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
note: misskey.entities.Note;
|
||||
|
@ -51,6 +63,8 @@ const props = withDefaults(defineProps<{
|
|||
depth: 1,
|
||||
});
|
||||
|
||||
const muted = ref(checkWordMute(props.note, $i, defaultStore.state.mutedWords));
|
||||
|
||||
let showContent = $ref(false);
|
||||
let replies: misskey.entities.Note[] = $ref([]);
|
||||
|
||||
|
@ -139,4 +153,12 @@ if (props.detail) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.muted {
|
||||
text-align: center;
|
||||
padding: 8px !important;
|
||||
border: 1px solid var(--divider);
|
||||
margin: 8px 8px 0 8px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in a new issue