From d40c083233509fdf10508bf83b006d066557ff77 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Mon, 2 Jun 2025 08:43:04 +0900 Subject: [PATCH] =?UTF-8?q?enhance(frontend):=20=E9=9D=9E=E5=90=8C?= =?UTF-8?q?=E6=9C=9F=E7=9A=84=E3=81=AA=E3=82=B3=E3=83=B3=E3=83=9D=E3=83=BC?= =?UTF-8?q?=E3=83=8D=E3=83=B3=E3=83=88=E3=81=AE=E8=AA=AD=E3=81=BF=E8=BE=BC?= =?UTF-8?q?=E3=81=BF=E6=99=82=E3=81=AE=E3=83=8F=E3=83=B3=E3=83=89=E3=83=AA?= =?UTF-8?q?=E3=83=B3=E3=82=B0=E3=82=92=E5=BC=B7=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/os.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/os.ts b/packages/frontend/src/os.ts index d50f50cf20..be247f96c4 100644 --- a/packages/frontend/src/os.ts +++ b/packages/frontend/src/os.ts @@ -211,13 +211,17 @@ export async function popupAsyncWithDialog( props: ComponentProps, events: Partial> = {}, ): Promise<{ dispose: () => void }> { - const closeWaiting = waiting(); - let component: T; + let closeWaiting = () => {}; + + const timer = window.setTimeout(() => { + closeWaiting = waiting(); + }, 100); // コンポーネントがキャッシュされている場合にもwaitingが表示されて画面がちらつくのを防止するためにラグを追加 try { component = await componentFetching; } catch (err) { + window.clearTimeout(timer); closeWaiting(); alert({ type: 'error', @@ -227,6 +231,7 @@ export async function popupAsyncWithDialog( throw err; } + window.clearTimeout(timer); closeWaiting(); markRaw(component);