fix: control UX — no default tool, launch loader, NPC layout

Deselect effect tools by default and on re-click, block the editor during session launch, and fix NPC overlay/window empty-state layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ivan Fontosh
2026-07-25 14:41:27 +08:00
parent fed5674468
commit 9d82e74272
10 changed files with 88 additions and 57 deletions
+18 -17
View File
@@ -214,22 +214,21 @@ export function NpcsApp() {
return (
<div className={styles.page}>
{hasActive ? (
<div className={styles.toolbar}>
<div className={styles.toolbarRow}>
<Button
title={t('npcs.closeOverlay')}
ariaLabel={t('npcs.closeOverlay')}
tooltipPlacement="bottom"
onClick={() => {
void overlayApi.dispatch({ kind: 'hide' });
}}
>
{t('npcs.closeOverlay')}
</Button>
</div>
<div className={styles.toolbar}>
<div className={styles.toolbarRow}>
<Button
title={t('npcs.closeOverlay')}
ariaLabel={t('npcs.closeOverlay')}
tooltipPlacement="bottom"
disabled={!hasActive}
onClick={() => {
void overlayApi.dispatch({ kind: 'hide' });
}}
>
{t('npcs.closeOverlay')}
</Button>
</div>
) : null}
</div>
<div className={styles.body}>
<div className={styles.detail}>
@@ -264,8 +263,10 @@ export function NpcsApp() {
);
})
) : (
<div className={styles.detailEmpty}>
{npcs.length === 0 ? t('npcs.windowEmpty') : t('npcs.selectToShow')}
<div className={styles.detailCard}>
<div className={styles.detailEmpty}>
{npcs.length === 0 ? t('npcs.windowEmpty') : t('npcs.selectToShow')}
</div>
</div>
)}
</div>