From 11b9a5210eacd894eefe43e8de6f54132dfa58dc Mon Sep 17 00:00:00 2001 From: caipira113 Date: Mon, 19 Jun 2023 01:02:10 +0900 Subject: [PATCH] fix(frontend): Show translate button only if translator is available --- packages/frontend/src/components/MkNote.vue | 3 ++- packages/frontend/src/components/MkNoteDetailed.vue | 3 ++- packages/frontend/src/components/MkSubNoteContent.vue | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index 4141cb359b..8143e69f35 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -66,7 +66,7 @@ ({{ i18n.ts.private }}) -
+
@@ -197,6 +197,7 @@ import { eventBus } from '@/scripts/cherrypick/eventBus'; import { mainRouter } from '@/router'; import { notePage } from '@/filters/note'; import { miLocalStorage } from '@/local-storage'; +import { instance } from '@/instance'; let showEl = $ref(false); diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index 55602abfc1..e352d82ed9 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -87,7 +87,7 @@ RN: -
+
@@ -202,6 +202,7 @@ import { MenuItem } from '@/types/menu'; import MkRippleEffect from '@/components/MkRippleEffect.vue'; import { showMovedDialog } from '@/scripts/show-moved-dialog'; import { miLocalStorage } from '@/local-storage'; +import { instance } from '@/instance'; const props = defineProps<{ note: misskey.entities.Note; diff --git a/packages/frontend/src/components/MkSubNoteContent.vue b/packages/frontend/src/components/MkSubNoteContent.vue index 17eb60babb..1c73efc798 100644 --- a/packages/frontend/src/components/MkSubNoteContent.vue +++ b/packages/frontend/src/components/MkSubNoteContent.vue @@ -6,7 +6,7 @@ RN: ... -
+
@@ -49,6 +49,7 @@ import { i18n } from '@/i18n'; import { $i } from '@/account'; import { defaultStore } from '@/store'; import { miLocalStorage } from '@/local-storage'; +import { instance } from '@/instance'; const showContent = ref(false); const translation = ref(null);