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";
|
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,25 +192,16 @@
|
|||||||
});
|
});
|
||||||
</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};`}
|
style={`right: ${assistantOffset};`}
|
||||||
on:click={handleOverlayClick}
|
role="dialog"
|
||||||
on:keydown={(e) => e.key === 'Escape' && handleClose()}
|
aria-modal="false"
|
||||||
role="button"
|
aria-label={$t.tasks?.drawer || "Task drawer"}
|
||||||
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};`}
|
|
||||||
role="dialog"
|
|
||||||
aria-modal="true"
|
|
||||||
aria-label={$t.tasks?.drawer || "Task drawer"}
|
|
||||||
>
|
|
||||||
<!-- Header -->
|
<!-- 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 justify-between border-b border-slate-200 bg-white px-5 py-3.5">
|
||||||
<div class="flex items-center gap-2.5">
|
<div class="flex items-center gap-2.5">
|
||||||
@@ -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] -->
|
||||||
|
|||||||
Reference in New Issue
Block a user