From 61019158cec979e136477196f99606fc58e244cf Mon Sep 17 00:00:00 2001
From: Hazelnoot <acomputerdog@gmail.com>
Date: Tue, 1 Apr 2025 12:49:30 -0400
Subject: add DynamicNoteDetailed.vue

---
 .../src/components/DynamicNoteDetailed.vue         | 40 ++++++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 packages/frontend/src/components/DynamicNoteDetailed.vue

(limited to 'packages/frontend/src/components/DynamicNoteDetailed.vue')

diff --git a/packages/frontend/src/components/DynamicNoteDetailed.vue b/packages/frontend/src/components/DynamicNoteDetailed.vue
new file mode 100644
index 0000000000..a6e8249f66
--- /dev/null
+++ b/packages/frontend/src/components/DynamicNoteDetailed.vue
@@ -0,0 +1,40 @@
+<!--
+SPDX-FileCopyrightText: hazelnoot and other Sharkey contributors
+SPDX-License-Identifier: AGPL-3.0-only
+-->
+
+<template>
+<XNoteDetailed
+	ref="rootEl"
+	:note="note"
+	:initialTab="initialTab"
+	:expandAllCws="expandAllCws"
+/>
+</template>
+
+<script setup lang="ts">
+import * as Misskey from 'misskey-js';
+import { computed, defineAsyncComponent, shallowRef } from 'vue';
+import type { ComponentExposed } from 'vue-component-type-helpers';
+import type MkNoteDetailed from '@/components/MkNoteDetailed.vue';
+import type SkNoteDetailed from '@/components/SkNoteDetailed.vue';
+import { prefer } from '@/preferences';
+
+const XNoteDetailed = computed(() =>
+	defineAsyncComponent(() =>
+		prefer.r.noteDesign.value === 'misskey'
+			? import('@/components/MkNoteDetailed.vue')
+			: import('@/components/SkNoteDetailed.vue'),
+	),
+);
+
+const rootEl = shallowRef<ComponentExposed<typeof MkNoteDetailed | typeof SkNoteDetailed>>();
+
+defineExpose({ rootEl });
+
+defineProps<{
+	note: Misskey.entities.Note;
+	initialTab?: string;
+	expandAllCws?: boolean;
+}>();
+</script>
-- 
cgit v1.2.3-freya

