From c412f5d69af032b6cc6e985c9591c3a106de704b Mon Sep 17 00:00:00 2001 From: Hazelnoot Date: Sun, 18 May 2025 14:51:22 -0400 Subject: extract common translation UI into SkNoteTranslation.vue --- .../frontend/src/components/MkSubNoteContent.vue | 26 ++++++++-------------- 1 file changed, 9 insertions(+), 17 deletions(-) (limited to 'packages/frontend/src/components/MkSubNoteContent.vue') diff --git a/packages/frontend/src/components/MkSubNoteContent.vue b/packages/frontend/src/components/MkSubNoteContent.vue index 9a59678a99..0780f6c910 100644 --- a/packages/frontend/src/components/MkSubNoteContent.vue +++ b/packages/frontend/src/components/MkSubNoteContent.vue @@ -12,14 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-only {{ i18n.ts._animatedMFM.play }} {{ i18n.ts._animatedMFM.stop }} -
- -
- {{ i18n.tsx.translatedFrom({ x: translation.sourceLang }) }}: - -
-
{{ i18n.ts.translationFailed }}
-
+ RN: ...
@@ -52,14 +45,20 @@ import * as os from '@/os.js'; import { checkAnimationFromMfm } from '@/utility/check-animated-mfm.js'; import { useRouter } from '@/router'; import { prefer } from '@/preferences.js'; +import SkNoteTranslation from '@/components/SkNoteTranslation.vue'; -const props = defineProps<{ +const props = withDefaults(defineProps<{ note: Misskey.entities.Note; translating?: boolean; translation?: Misskey.entities.NotesTranslateResponse | false | null; hideFiles?: boolean; expandAllCws?: boolean; -}>(); +}>(), { + translating: false, + translation: null, + hideFiles: false, + expandAllCws: false, +}); const router = useRouter(); @@ -141,13 +140,6 @@ watch(() => props.expandAllCws, (expandAllCws) => { color: var(--MI_THEME-renote); } -.translation { - border: solid 0.5px var(--MI_THEME-divider); - border-radius: var(--MI-radius); - padding: 12px; - margin-top: 8px; -} - .showLess { width: 100%; margin-top: 14px; -- cgit v1.2.3-freya