From b507b6240c8a139c1b4874b0a6d0be5e61a2e173 Mon Sep 17 00:00:00 2001
From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com>
Date: Tue, 25 Jun 2024 23:51:32 +0900
Subject: [PATCH] =?UTF-8?q?embed=20ui=E3=81=8C=E6=AD=A3=E5=B8=B8=E3=81=AB?=
 =?UTF-8?q?=E8=AA=AD=E3=81=BF=E8=BE=BC=E3=81=BE=E3=82=8C=E3=81=AA=E3=81=84?=
 =?UTF-8?q?=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 packages/frontend/src/_embed_boot_.ts  | 7 +++++--
 packages/frontend/src/boot/sub-boot.ts | 4 ++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/packages/frontend/src/_embed_boot_.ts b/packages/frontend/src/_embed_boot_.ts
index bbd42905e3..836e6865b6 100644
--- a/packages/frontend/src/_embed_boot_.ts
+++ b/packages/frontend/src/_embed_boot_.ts
@@ -8,8 +8,9 @@ import 'vite/modulepreload-polyfill';
 
 import '@/style.scss';
 import '@/style.embed.scss';
+import { createApp, defineAsyncComponent } from 'vue';
+import { common } from '@/boot/common.js';
 import type { CommonBootOptions } from '@/boot/common.js';
-import { subBoot } from '@/boot/sub-boot.js';
 import { setIframeId, postMessageToParentWindow } from '@/scripts/post-message.js';
 import { defaultStore } from '@/store.js';
 
@@ -35,7 +36,9 @@ window.addEventListener('message', event => {
 });
 
 // 起動
-subBoot(bootOptions, true).then(() => {
+common(() => createApp(
+	defineAsyncComponent(() => import('@/ui/embed.vue')),
+), bootOptions).then(({ isClientUpdated }) => {
 	// 起動完了を通知(このあとクライアント側から misskey:embedParent:registerIframeId が送信される)
 	postMessageToParentWindow('misskey:embed:ready');
 });
diff --git a/packages/frontend/src/boot/sub-boot.ts b/packages/frontend/src/boot/sub-boot.ts
index ea6dce2d4d..12377366bc 100644
--- a/packages/frontend/src/boot/sub-boot.ts
+++ b/packages/frontend/src/boot/sub-boot.ts
@@ -7,8 +7,8 @@ import { createApp, defineAsyncComponent } from 'vue';
 import { common } from './common.js';
 import type { CommonBootOptions } from './common.js';
 
-export async function subBoot(options?: Partial<CommonBootOptions>, isEmbedPage?: boolean) {
+export async function subBoot(options?: Partial<CommonBootOptions>) {
 	const { isClientUpdated } = await common(() => createApp(
-		defineAsyncComponent(() => isEmbedPage ? import('@/ui/embed.vue') : import('@/ui/minimum.vue')),
+		defineAsyncComponent(() => import('@/ui/minimum.vue')),
 	), options);
 }