From ebfd07628e722a1f3e1713899d3313a63ba2fd34 Mon Sep 17 00:00:00 2001 From: naskya Date: Thu, 4 May 2023 14:41:18 +0900 Subject: [PATCH] format --- packages/backend/src/misc/check-word-mute.ts | 2 +- packages/client/src/components/MkNote.vue | 18 ++++++++---------- .../client/src/components/MkNoteDetailed.vue | 18 ++++++++---------- packages/client/src/components/MkNoteSub.vue | 18 ++++++++---------- .../client/src/components/MkVisibility.vue | 4 ++-- packages/client/src/scripts/check-word-mute.ts | 4 ++-- 6 files changed, 29 insertions(+), 35 deletions(-) diff --git a/packages/backend/src/misc/check-word-mute.ts b/packages/backend/src/misc/check-word-mute.ts index 7d36d8f7d9..472a2fcbe7 100644 --- a/packages/backend/src/misc/check-word-mute.ts +++ b/packages/backend/src/misc/check-word-mute.ts @@ -67,7 +67,7 @@ export async function getWordHardMute( } if (mutedWords.length > 0) { - return checkWordMute(note) || checkWordMute(reply) || checkWordMute(renote) + return checkWordMute(note) || checkWordMute(reply) || checkWordMute(renote); } return false; diff --git a/packages/client/src/components/MkNote.vue b/packages/client/src/components/MkNote.vue index 7a72a250a0..c1ab3bf7a3 100644 --- a/packages/client/src/components/MkNote.vue +++ b/packages/client/src/components/MkNote.vue @@ -262,18 +262,14 @@ const inChannel = inject("inChannel", null); let note = $ref(deepClone(props.note)); const softMuteReasonI18nSrc = (what?: string) => { - if (what === "note") - return i18n.ts.userSaysSomethingReason; - if (what === "reply") - return i18n.ts.userSaysSomethingReasonReply; - if (what === "renote") - return i18n.ts.userSaysSomethingReasonRenote; - if (what === "quote") - return i18n.ts.userSaysSomethingReasonQuote; + if (what === "note") return i18n.ts.userSaysSomethingReason; + if (what === "reply") return i18n.ts.userSaysSomethingReasonReply; + if (what === "renote") return i18n.ts.userSaysSomethingReasonRenote; + if (what === "quote") return i18n.ts.userSaysSomethingReasonQuote; // I don't think here is reachable, but just in case return i18n.ts.userSaysSomething; -} +}; // plugin if (noteViewInterruptors.length > 0) { @@ -305,7 +301,9 @@ let appearNote = $computed(() => const isMyRenote = $i && $i.id === note.userId; const showContent = ref(false); const isDeleted = ref(false); -const muted = ref(getWordSoftMute(appearNote, $i, defaultStore.state.mutedWords)); +const muted = ref( + getWordSoftMute(appearNote, $i, defaultStore.state.mutedWords) +); const translation = ref(null); const translating = ref(false); const enableEmojiReactions = defaultStore.state.enableEmojiReactions; diff --git a/packages/client/src/components/MkNoteDetailed.vue b/packages/client/src/components/MkNoteDetailed.vue index 652d762508..84dc4c083c 100644 --- a/packages/client/src/components/MkNoteDetailed.vue +++ b/packages/client/src/components/MkNoteDetailed.vue @@ -111,18 +111,14 @@ const inChannel = inject("inChannel", null); let note = $ref(deepClone(props.note)); const softMuteReasonI18nSrc = (what?: string) => { - if (what === "note") - return i18n.ts.userSaysSomethingReason; - if (what === "reply") - return i18n.ts.userSaysSomethingReasonReply; - if (what === "renote") - return i18n.ts.userSaysSomethingReasonRenote; - if (what === "quote") - return i18n.ts.userSaysSomethingReasonQuote; + if (what === "note") return i18n.ts.userSaysSomethingReason; + if (what === "reply") return i18n.ts.userSaysSomethingReasonReply; + if (what === "renote") return i18n.ts.userSaysSomethingReasonRenote; + if (what === "quote") return i18n.ts.userSaysSomethingReasonQuote; // I don't think here is reachable, but just in case return i18n.ts.userSaysSomething; -} +}; const enableEmojiReactions = defaultStore.state.enableEmojiReactions; @@ -156,7 +152,9 @@ let appearNote = $computed(() => const isMyRenote = $i && $i.id === note.userId; const showContent = ref(false); const isDeleted = ref(false); -const muted = ref(getWordSoftMute(appearNote, $i, defaultStore.state.mutedWords)); +const muted = ref( + getWordSoftMute(appearNote, $i, defaultStore.state.mutedWords) +); const translation = ref(null); const translating = ref(false); const urls = appearNote.text diff --git a/packages/client/src/components/MkNoteSub.vue b/packages/client/src/components/MkNoteSub.vue index 1d761405b3..74ffcf8c86 100644 --- a/packages/client/src/components/MkNoteSub.vue +++ b/packages/client/src/components/MkNoteSub.vue @@ -226,18 +226,14 @@ const props = withDefaults( let note = $ref(deepClone(props.note)); const softMuteReasonI18nSrc = (what?: string) => { - if (what === "note") - return i18n.ts.userSaysSomethingReason; - if (what === "reply") - return i18n.ts.userSaysSomethingReasonReply; - if (what === "renote") - return i18n.ts.userSaysSomethingReasonRenote; - if (what === "quote") - return i18n.ts.userSaysSomethingReasonQuote; + if (what === "note") return i18n.ts.userSaysSomethingReason; + if (what === "reply") return i18n.ts.userSaysSomethingReasonReply; + if (what === "renote") return i18n.ts.userSaysSomethingReasonRenote; + if (what === "quote") return i18n.ts.userSaysSomethingReasonQuote; // I don't think here is reachable, but just in case return i18n.ts.userSaysSomething; -} +}; const isRenote = note.renote != null && @@ -255,7 +251,9 @@ let appearNote = $computed(() => isRenote ? (note.renote as misskey.entities.Note) : note ); const isDeleted = ref(false); -const muted = ref(getWordSoftMute(appearNote, $i, defaultStore.state.mutedWords)); +const muted = ref( + getWordSoftMute(appearNote, $i, defaultStore.state.mutedWords) +); const translation = ref(null); const translating = ref(false); const replies: misskey.entities.Note[] = diff --git a/packages/client/src/components/MkVisibility.vue b/packages/client/src/components/MkVisibility.vue index faf06668c2..c5922ba00c 100644 --- a/packages/client/src/components/MkVisibility.vue +++ b/packages/client/src/components/MkVisibility.vue @@ -1,6 +1,6 @@