fix(task-drawer): render as side column without modal overlay when opened from assistant
This commit is contained in:
@@ -64,9 +64,9 @@
|
||||
window.location.href = "/reports";
|
||||
}
|
||||
|
||||
// Handle overlay click
|
||||
function handleOverlayClick(event) {
|
||||
if (event.target === event.currentTarget) {
|
||||
function handleGlobalKeydown(event) {
|
||||
if (!isOpen) return;
|
||||
if (event.key === "Escape") {
|
||||
handleClose();
|
||||
}
|
||||
}
|
||||
@@ -192,25 +192,16 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- Drawer Overlay -->
|
||||
<svelte:window on:keydown={handleGlobalKeydown} />
|
||||
|
||||
{#if isOpen}
|
||||
<div
|
||||
class="fixed inset-0 z-[69] bg-black/35 backdrop-blur-sm"
|
||||
<aside
|
||||
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"}
|
||||
role="dialog"
|
||||
aria-modal="false"
|
||||
aria-label={$t.tasks?.drawer || "Task 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};`}
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
aria-label={$t.tasks?.drawer || "Task drawer"}
|
||||
>
|
||||
<!-- Header -->
|
||||
<div class="flex items-center justify-between border-b border-slate-200 bg-white px-5 py-3.5">
|
||||
<div class="flex items-center gap-2.5">
|
||||
@@ -304,8 +295,7 @@
|
||||
{$t.tasks?.footer_text || 'Task continues running in background'}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
{/if}
|
||||
|
||||
<!-- [/DEF:TaskDrawer:Component] -->
|
||||
|
||||
Reference in New Issue
Block a user