fix(task-drawer): render as side column without modal overlay when opened from assistant

This commit is contained in:
2026-02-24 14:09:34 +03:00
parent 3d42a487f7
commit 37b75b5a5c

View File

@@ -64,9 +64,9 @@
window.location.href = "/reports"; window.location.href = "/reports";
} }
// Handle overlay click function handleGlobalKeydown(event) {
function handleOverlayClick(event) { if (!isOpen) return;
if (event.target === event.currentTarget) { if (event.key === "Escape") {
handleClose(); handleClose();
} }
} }
@@ -192,23 +192,14 @@
}); });
</script> </script>
<!-- Drawer Overlay --> <svelte:window on:keydown={handleGlobalKeydown} />
{#if isOpen} {#if isOpen}
<div <aside
class="fixed inset-0 z-[69] bg-black/35 backdrop-blur-sm" class="fixed top-0 z-[70] flex h-full w-full max-w-[560px] flex-col border-l border-slate-200 bg-white shadow-[-8px_0_30px_rgba(15,23,42,0.15)] transition-[right] duration-300 ease-out"
style={`right: ${assistantOffset};`}
on:click={handleOverlayClick}
on:keydown={(e) => e.key === 'Escape' && handleClose()}
role="button"
tabindex="0"
aria-label={$t.tasks?.close_drawer || "Close drawer"}
>
<!-- Drawer Panel -->
<div
class="fixed top-0 z-[72] flex h-full w-full max-w-[560px] flex-col border-l border-slate-200 bg-white shadow-[-8px_0_30px_rgba(15,23,42,0.15)] transition-[right] duration-300 ease-out"
style={`right: ${assistantOffset};`} style={`right: ${assistantOffset};`}
role="dialog" role="dialog"
aria-modal="true" aria-modal="false"
aria-label={$t.tasks?.drawer || "Task drawer"} aria-label={$t.tasks?.drawer || "Task drawer"}
> >
<!-- Header --> <!-- Header -->
@@ -304,8 +295,7 @@
{$t.tasks?.footer_text || 'Task continues running in background'} {$t.tasks?.footer_text || 'Task continues running in background'}
</p> </p>
</div> </div>
</div> </aside>
</div>
{/if} {/if}
<!-- [/DEF:TaskDrawer:Component] --> <!-- [/DEF:TaskDrawer:Component] -->