parent
c04c071aec
commit
747f1d6e04
4 changed files with 7 additions and 7 deletions
|
@ -82,7 +82,7 @@
|
|||
:enableEmojiReactions
|
||||
:hideEmojiViewer
|
||||
:detailedView
|
||||
:note-translation="noteTranslation!"
|
||||
:note-translation="noteTranslation"
|
||||
@deleted="isDeleted = true"
|
||||
@event:focus="focus"
|
||||
@event:blur="blur"
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
:enableEmojiReactions
|
||||
:hideEmojiViewer
|
||||
:detailedView
|
||||
:note-translation="noteTranslation!"
|
||||
:note-translation="noteTranslation"
|
||||
@deleted="isDeleted = true"
|
||||
@event:focus="focus"
|
||||
@event:blur="blur"
|
||||
|
|
|
@ -74,11 +74,11 @@
|
|||
v-if="
|
||||
isSignedIn(me) &&
|
||||
isForeignLanguage &&
|
||||
noteTranslation.canTranslate
|
||||
noteTranslation?.canTranslate
|
||||
"
|
||||
v-tooltip.noDelay.bottom="i18n.ts.translate"
|
||||
class="button _button"
|
||||
@click.stop="noteTranslation.translate"
|
||||
@click.stop="noteTranslation?.translate"
|
||||
>
|
||||
<i :class="icon('ph-translate')"></i>
|
||||
</button>
|
||||
|
@ -118,7 +118,7 @@ const props = defineProps<{
|
|||
enableEmojiReactions?: boolean;
|
||||
hideEmojiViewer?: boolean;
|
||||
detailedView?: boolean;
|
||||
noteTranslation: InstanceType<typeof MkNoteTranslation>;
|
||||
noteTranslation: InstanceType<typeof MkNoteTranslation> | null;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
|
@ -151,7 +151,7 @@ const isForeignLanguage = computed(
|
|||
props.note.text != null &&
|
||||
(() => {
|
||||
const postLang = detectLanguage(props.note.text);
|
||||
return postLang !== "" && postLang !== props.noteTranslation.targetLang;
|
||||
return postLang !== "" && postLang !== props.noteTranslation?.targetLang;
|
||||
})(),
|
||||
);
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ export function getNoteMenu(props: {
|
|||
note: entities.Note;
|
||||
menuButton: Ref<HTMLElement | undefined>;
|
||||
isDeleted: Ref<boolean>;
|
||||
translationEl: InstanceType<typeof MkNoteTranslation>;
|
||||
translationEl: InstanceType<typeof MkNoteTranslation> | null;
|
||||
currentClipPage?: Ref<entities.Clip> | null;
|
||||
}) {
|
||||
const isRenote =
|
||||
|
|
Loading…
Reference in a new issue